Hi,
i have following problem: I have a function in which I need to change some variables of class. I tried to pass a reference to this class as a function parameter but I get a violation acces warning and the function doesn't run. Could you please help me?
The code looks like this:
Class1 myClass1;
void DoSomething(int n, Class1 &r_myClass) {
r_myClass.ChangeVar;
... // some other tasks
}
I can't define this function as a member function of the Class1 for some reasons.
Hope it's not too confused...
Thanks for help, H.
i have following problem: I have a function in which I need to change some variables of class. I tried to pass a reference to this class as a function parameter but I get a violation acces warning and the function doesn't run. Could you please help me?
The code looks like this:
Class1 myClass1;
void DoSomething(int n, Class1 &r_myClass) {
r_myClass.ChangeVar;
... // some other tasks
}
I can't define this function as a member function of the Class1 for some reasons.
Hope it's not too confused...
Thanks for help, H.