I'm trying to debug some code and have narrowed it down to my non-understanding of passing pointers. I've reviewed the forums but still haven't figured it out.
something like this:
But what's happening is that when I step into the objectContainer class functions using gdb and query the contents of "dev" they are changed. And of course when I step back into the global scope they haven't.Code:objectContainer::objectContainer(devhandle* dev){} objectContainer::dosomething1(){ VME_write(dev, data); } devhandle *dev; getVMEhandle(dev); // get the device handle using library call objectContainer Device1(dev); // make an object that will contain the handle ... Device1.dosomething1; Device1.dosomething2; ...
The result is that none of the containerized hardware calls will not work until I can pass the pointer correctly through the several layers of scope.
Looking for insight,
Dave++



LinkBack URL
About LinkBacks



Want to add some
CornedBee
