And hi..
Thank you for reading my topic
------------------------------
After building this code:
Code:
#include<iostream>
using namespace std;
int main()
{
for(int i=0; i<5 ; i++)
{
cout << "i:" << i << endl;
}
i = 7;
return 0;
}
i read that the problem means my compiler does not support this aspect of the ANSI standard...
what is meant by that and how can i make my compiler support or not ?!
**** Build of configuration Debug for project Linux_Xp_Learning ****
make all
Building file: ../scoped_for_loop.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"scoped_for_loop.d" -MT"scoped_for_loop.d" -o"scoped_for_loop.o" "../scoped_for_loop.cpp"
../scoped_for_loop.cpp: In function ‘int main()’:
../scoped_for_loop.cpp:19: error: name lookup of ‘i’ changed for ISO ‘for’ scoping
../scoped_for_loop.cpp:19: note: (if you use ‘-fpermissive’ G++ will accept your code)
make: *** [scoped_for_loop.o] Error 1
