I downloaded the gcc 4.7.0 package, went through the documentation for make and building, install etc many times, but its all way above my understanding. Its maybe because I have been a windows user and new to C++, so , most of it seems Unix to me. Can some one help me out. I want to use gcc 4.7.0 with MinGW, I have already MinGW with 4.6.1 and as I went through the documentation, it does not support the -std flag for C-11 features, which is the main reason for updating.
tried
-std=c++0x flag
but does not work for me with those features, can some one help me build gcc 4.7.0 or advise any compiler which fully supports c++11?
Well, the code snippet makes no sense. You're not using the range-based for on a container/range, but on a simple variable. You can make use of intializer lists, though: for(int a : {x})...
range based for loops require the thing to be iterated over to be
a (fixed size) array OR
an object that has "begin" and "end" functions that return iterators.
@Athar, @hanst99
Thank you, I realized that the problem is with my code and not the compiler, but in the quest I found some thing I was long striving for gcc 4.7
@JLBorges
Special thanks
I would like to leave some thing for other like me.