i have a problem when i run foo_bar2 and it calls foo_bar how come the pointers *nx, *ny never change? it always equals zero when i first initialise it. what have i done wrong? I dont want it to print out the result in foo_bar, i want to pass the pointers in from foo_bar into foo_bar2!

sorry thats not it. this code is just an example of my full program, sort its a little vague.
Im just having problems passing the pointer value into another function, it does not seem to want to accept it.

where i have:

*nx = crt1;
*ny = crt2;

i tried nx=&crt1;
i get weird numbers

i also tried make *nx=0, then i did (*nx)++, so just incrementing the pointer value.

04-24-2003

Hammer

I'm confused, are you trying to increment (or amend) the pointer itself, or the data it points to?

04-24-2003

kurz7

all i basically want to do is have two counters, and i want to assign two pointers, one to each counter, and then pass it forward to a new function.

04-24-2003

Dave_Sinkula

>is there any other way i can do this without using that goto statement?