As I understand it, when I read about this, a pointer is needed mostly when we use several objects of the same class. However, the question arises whether it is necessary to assign a value through a pointer in the default constructor or with parameters (below the example code
class A{ public: A(int in); private: int tmp; }; A::A(int in){ this->tmp=in; // или же tmp=in; }
thisis the hidden parameter of every non-static class method. Onthis, all the functionality of classes is fundamentally built. Without it - nowhere, no matter how many objects we have. - AnT