pointers to object questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a program that instantiates a Connector object,
and then a Sender object passing a pointer to the
Connector object as a parameter.

Connector theConnector;
Sender theSender( &theConnector );

When the object Sender is instantiated, it
instantiates a Data object passing again the same
pointer to the Connector object.

Sender::Sender( Connector * newConnector )
{
	theConnector = newConnector;
	Data theData( newConnector );
}

When the methods of the Sender object use the
Connector object, I don't have any problem, but for
some reason it doesn't work, when the methods of Data
try to use the  Connector object. Do you guys have any
idea about what could be wrong?
This is the constructor of the Data class if it might
help:

Data::Data( Connector * newConnector )
{
	theConnector = newConnector;
}

Thanks a lot,

Andre


	
		
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux