Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Going on a limp here because I sort of learned cpp by learning by doing, so im looking forward to someone replying who knows his cpp :). But until then:

I think the rough idea here is that Ptr stands for pointer. Why not use standard cpp pointers? you don't have to clean up after ptrs. I suppose your program crashes because you're calling methods of the object which your pointer is pointer to which is "not initialized". Can do that by assigning the pointer to an object, either at creation or at any point before calling methods.

I think they are called smart pointers, you might find more information when googling for that.