All, recently i tried to use the new features supported by c++11, and i wrote such statement however the compiler ran failed.
auto x = 1;
the report error listed below:
D:DEVCBCppTestmain.cpp||In function 'int main()':|
D:DEVCBCppTestmain.cpp|22|warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]|
D:DEVCBCppTestmain.cpp|22|error: 'x' does not name a type|
||=== Build finished: 1 errors, 1 warnings ===|
Why the last gcc version 4.7.0 on MinGW cannot support the this statement. But the compiler of vs10 passed. Could anyone know the reason for this issue?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…