For example, there is a class:
class B { void print() { std::cout << имя объекта; return; }; } As in print() get the name of the object so that the result of the call:
int main( void ) { B name; name.print(); return 0; } Was name
For example, there is a class:
class B { void print() { std::cout << имя объекта; return; }; } As in print() get the name of the object so that the result of the call:
int main( void ) { B name; name.print(); return 0; } Was name
Source: https://ru.stackoverflow.com/questions/792894/
All Articles