Hi,
I have a class:
class myClass {
int number;
void incrNumber() {number++; }
void something();
};
myclass c[3];
myClass::something() {
//here i'd like make something such as myClass[3].incrNumber();
}
class myClass {
int number;
void incrNumber() {number++; }
void something();
};
myclass c[3];
myClass::something() {
//here i'd like make something such as myClass[3].incrNumber();
}
To copy to clipboard, switch view to plain text mode
Is there a way to modify the state of an instance of object only (and only one) from a method of myClass?
Thanks.
Bookmarks