This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Static Variables

Hi everyone,

I would like to know if something similar happen to you. Well the issue is that when I declare a variable as a global one in the header file of a module with extern sometimes it loses its value. And if I declare it as static I can not access to it from other module. As far As I understand, a static variable is the same during the all of the execution of the program and it has a space of memory reserved to it. Can anyone please clarify this?

Thanks in advance.

Parents Reply Children