I
ishekar
Hi,
I have a class which has only one constructor that takes an argument.
I want the users of this class to pass the parameter in the declaration.
The problem i am facing is this cannot be used in the declaration section.
is there any work around.
thanks
ishekar.
class A
{
public:
A(string c){...};
}
//some user using this class
class B
{
public:
B();
private:
A("This is B's copy of A"); // this is not permitted
}
I have a class which has only one constructor that takes an argument.
I want the users of this class to pass the parameter in the declaration.
The problem i am facing is this cannot be used in the declaration section.
is there any work around.
thanks
ishekar.
class A
{
public:
A(string c){...};
}
//some user using this class
class B
{
public:
B();
private:
A("This is B's copy of A"); // this is not permitted
}