Ok, this is kinda confusing me, and what i thought should work, didn't. Lets say i have the following code:
Of course, this wouldnt work because your passing a pointer to a non-pointer parameter. And you cant callCode:int variable; void function1(int *variable) { // do something function2(int *variable); } void function2(int variable) { }
as that is not passing in the parameter correctly which was recieved in function 1.Code:function2(int variable);
I thought that i could get it to work by using:That way, it is passing the value of the pointer, hence what im after. But this doesnt workCode:function2(int &(*variable));
So how can i call function2 inside function1? Do i need to change the structure of function2 to pass a pointer to it? If so, then how would i call it in function 1?



LinkBack URL
About LinkBacks




That helps a lot, though i actually found the problem in my code to be: