L
Larry
how to use a class variable without initiate
for example:
ClassA { int var1; }
ClassB{
ClassA aa = new ClassA(); // omit this
aa.var1 = 1; // call this variable directly
}
I am thinking I may try something like this:
ClassA::var1 = 1;
hope you can make me clear.
thanks
larry
for example:
ClassA { int var1; }
ClassB{
ClassA aa = new ClassA(); // omit this
aa.var1 = 1; // call this variable directly
}
I am thinking I may try something like this:
ClassA::var1 = 1;
hope you can make me clear.
thanks
larry