This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

pointers to object questions


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]