class Animal { public: int a; double d; int f(){ return 25;} };
Suppose for the above code I am trying to initialize an object by saying new Animal() , does this new() memory for the f() function?
In other words, what's the difference in memory allocation expressions if I had this class instead and made new Animal() ? :
class Animal { public: int a; double d; };
c ++ memory-management object new-operator
Moeb
source share