B
batista
Hello to ALL,
I'll explain my problem by pseudo code
class A
{
int x;
char y;
string z;
}
class B
{
GetVariable(int i)
{
A a = new A();
//Now I want to return the ith varaible
//of class A
}
}
class C
{
GetVar()
{
B b = new B();
b.GetVariable(0) //it shud return x
b.GetVariable(1) //it shud return y
b.GetVariable(2) //it shud return z
}
}
Now how do I implement the GetVariable(int i), in VC++
The reason I have class B is because there are lot's of classes
like class A, and i don't want to edit them all.
Any Suggestions...
Thanks In advance...
Cheers...
Bye
I'll explain my problem by pseudo code
class A
{
int x;
char y;
string z;
}
class B
{
GetVariable(int i)
{
A a = new A();
//Now I want to return the ith varaible
//of class A
}
}
class C
{
GetVar()
{
B b = new B();
b.GetVariable(0) //it shud return x
b.GetVariable(1) //it shud return y
b.GetVariable(2) //it shud return z
}
}
Now how do I implement the GetVariable(int i), in VC++
The reason I have class B is because there are lot's of classes
like class A, and i don't want to edit them all.
Any Suggestions...
Thanks In advance...
Cheers...
Bye