Fred K Ollinger on Sat, 13 Jul 2002 17:30:12 +0200 |
I have this code where I have an object and I'd like to modify it while in another object. Is there a way to do this? I get segfaults when I do: // begin snippet voxInstallCommon::voxInstallCommon(QLabel *qlIncoming) { qlBillBoard=new QLabel("unlabeled", 0, 0); qlBillBoard=qlIncoming; //end snippet Why? Is there a better way to gain access to an oject in another object? I have spent a lot of time reading about this and trying permutations to no avail. I want the oject to be persistent in the other object. I have successfully passed a pointer to an object in the function, but the pointer is not persistent so I'm trying to do this via a constructor and then make a pointer to the pointer. Since all the pointers are aiming at the same patch of memory this should work, but it doesn't. Fred Ollinger (follinge@sas.upenn.edu) CCN sysadmin ______________________________________________________________________ Philadelphia Linux Users Group - http://www.phillylinux.org Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce General Discussion - http://lists.phillylinux.org/mail/listinfo/plug
|
|