P
Patrick Guio
Dear all,
I wonder whether there is simple way to do the following.
I have a class A which the default constructor takes an integer as
argument:
A a(2);
Now I create an object of class A at compilation time (I now the integer
value only at run-time)
What I would like to do is to define a class B that behaves like the
object of class A created with an integer value at run time
but which creator does not take any argument.
Something like
int main(int nargs, char *args[])
{
A a(nargs);
B b;
}
where b would actually be the same as a(nargs).
Sincerely,
Patrick
I wonder whether there is simple way to do the following.
I have a class A which the default constructor takes an integer as
argument:
A a(2);
Now I create an object of class A at compilation time (I now the integer
value only at run-time)
What I would like to do is to define a class B that behaves like the
object of class A created with an integer value at run time
but which creator does not take any argument.
Something like
int main(int nargs, char *args[])
{
A a(nargs);
B b;
}
where b would actually be the same as a(nargs).
Sincerely,
Patrick