is there any variable type that we can change it's value in global scope?

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: is there any variable type that we can change it's value in global scope?

I'm not sure I'm understanding the question. Any non-const variable defined as being in global scope in a single program file can be changed anywhere in that program file after the definiton providing the variable hasn't been re-defined within a local block.

Do you mean that you want a global variable defined in one program file to be able to be accessed in another program file that is part of the same compilation project/solution?

All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

Re: is there any variable type that we can change it's value in global scope?

Originally Posted by 2kaud

I'm not sure I'm understanding the question. Any non-const variable defined as being in global scope in a single program file can be changed anywhere in that program file after the definiton providing the variable hasn't been re-defined within a local block.

Do you mean that you want a global variable defined in one program file to be able to be accessed in another program file that is part of the same compilation project/solution?