cout << "catalog address: " << &catalog << endl;
cout << "catalog is pointing to " << catalog << endl;
cout << catalog->as_string();
local_catalog_address if the momery location of a Diagram object.
When I print "catalog is point to ..." the address is the correct address (&(0x8b4fbe8) for example). I'm sure that the address is correct because I print it on the class containing the method get_local_catalog(), and the addresses match.
I have a segmentation fault when I try to invoke the method as_string(), even if this method is working when used on the other class.
Am I missing something???
I undestand what you say. In my mind what I think is:
If I have a pointer to an object, whatever it is, and I achieve the goal to make it point to an address where I know there is an istantiation of this object, I can use this pointer.
Reading what you wrote, it seems that my reasoning is wrong. Is it?