- #1
Rainier9
- 32
- 0
I need to print the int i right next to the main, but I need to do it while I am in the if portion of the following code:
Right now it prints 7. I need it to print 5 without changing the variable name.
Code:
int i = 7;
int main()
{
int i = 5;
cout << ::i;
if(1)
{
int i =9;
cout << ::i<<endl;
}
return 0;
}
Right now it prints 7. I need it to print 5 without changing the variable name.