Hi, I was wondering is there anyway to define a variable inside a loop with global access definition. for instance how can i change use i out of the following f scope:
1 2 3 4 5 6 7 8 9
class myClass{
...
}
if(true){
myClass i;
}
i.print();
Yeah that was right answer, I just defined a pointer before my if condition and then I allocated memory inside id and before ending if I pointer it to the data: