I'm trying to access an array across files, like this;
int option[NUMBER_OF_OPTIONS];
...
addition(&option[0], num1, num2);
...
printf("%d", option[0]);
thats the first(main) file
and the second is like this;
void addition(int * option, unsigned number1, unsigned number2)
{
int total = number1 + number2;
...
*option ++;
}
Something like that. Dont worry about the addition method.
The problem is that the printf method allways prints 0, as if *option ++; is never executed/read.
How do i fix this?
By the way, I get a warning in the "*option++;" file saying: warning: value computed is not used.
How do I solve this problem?
Thank you!