Original Post
Very simple question. Is it a given that the class and pointer exist in the same memory location? It's purely educational. I don't want to do this. Thanks
class SomeClass, no deriving
{
public:
.. slew of functions ..
private:
CHAR *Data;
};
// Is this safe?
SomeClass *object = new SomeClass;
.. some code that ends up with a string in the data pointer ..
sprintf( String, "String = %s", object );