I have two files....main.c and func.c
I want to initialize a value globally in main.c
I want to send func.c parameters and for a function within that file to be able to see (not pass) the global variable I initialized. I then want that func within func.c to act on the parameters then change the global variable and return its value....Within main I will then act upon this value and clear it....The next time function within func.c gets called I would like it to recognize that main modified the variable....and so forth....
Basically I want to init and clear a variable in main and when func gets called it also modifies that variable....During the init and clear within main I will use the modified variable from func. I do NOT want to clear this variable within func ...
Any ideas?