Why should I use a pointer rather than the object itself?
It’s very unfortunate that you see dynamic allocation so often. That just shows how many bad C++ programmers there are. In a sense, you have two questions bundled up into one. The first is when should we use dynamic allocation (using new)? The second is when should we use pointers? The important take-home message is … Read more