Afficher un message
Vieux 05/02/2008, 06h42   #1
pauldepstein@att.net
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Getting hold of parameters in constructor

I have a class defined as follows:

class SomeClass
{

public:

SomeClass( SomeType& SomeThing, AnotherType& SomeThingElse,
YetAnotherType& YouAintSeenThis);
};

This constructor is the only function in the class definition. I am
trying to write a class to handle members of SomeClass. How can I get
hold of the parameters such as SomeThing, SomeThingElse and
YetAnotherType without changing SomeClass?

In other words, suppose x is a member of SomeClass. What is the c++
for "the variable SomeThing (of type SomeType) that was used in the
construction of x" ?

Thank you for your .

Paul Epstein
  Réponse avec citation
 
Page generated in 0,04513 seconds with 9 queries