Class Instantiation

It’s basically a copy paste of what I found on stackoverflow.com .
I don’t know if it actually does anything but the code compiles.

Yes, you won’t notice a difference in this case. But note that in C++ if you create an object of a class with the new operator, then you’ll have to delete that object when no more needed, otherwise it is a memory leak :slight_smile:

Privacy & Terms