M
Michel Rouzic
I'm sure that it's a dumb problem where i surely did something dumb,
but, I got a problem, I got a variable that we'll call var1. in the
main() function, this variable var1 (of type unsigned) of a value of
lets say 1000. now i got a function that we'll call func1, declared by
void func1(unsigned var1) and called by func1(var1);. in this function
at some point there is let's say var1=var1*2;. everything works fine
until the end of that function, the problem is that as soon as i come
back to the main function (after the execution of the func1 function)
the value of var1 is not 2000 as expected but 1000
i already encountered the same problem in other functions in the same
program, so what did i do wrong?
but, I got a problem, I got a variable that we'll call var1. in the
main() function, this variable var1 (of type unsigned) of a value of
lets say 1000. now i got a function that we'll call func1, declared by
void func1(unsigned var1) and called by func1(var1);. in this function
at some point there is let's say var1=var1*2;. everything works fine
until the end of that function, the problem is that as soon as i come
back to the main function (after the execution of the func1 function)
the value of var1 is not 2000 as expected but 1000
i already encountered the same problem in other functions in the same
program, so what did i do wrong?