Please support our C++ advertiser: Programming Forums
Plz look at this code
<< moderator edit: added [code][/code] tags >>
does anybody know how can i access main local variable x, from inside the block, without using pointers or references?
#include<iostream.h>
int x=0;
int main()
{
int x=1;
{
int x=2;
cout<<::x;
cout<<x;
}
return 0;
}does anybody know how can i access main local variable x, from inside the block, without using pointers or references?
Similar Threads
Other Threads in the C++ Forum
Other Threads in the C++ Forum
- Previous Thread: Combining multiple programs...activating under anb ift statement??
- Next Thread: fuction help needed
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Threaded Mode