ok so i started reading a book and it has a section with c++11 features in it.
when i try copy paste the code i get errors.
for example i want to compile this code.
and dont worry i included all headers and those type of stuff.
std::vector<double> vec;
for ( auto& elem : vec )
{
elem *= 3;
}
but i get all sort of compiler errors.
i google'd this topic and found that i have to turn the flag "-std=c++0x" on,threw progect -> build options
or compiler and debugger.
so i did just that and i still have errors in my code.
i think its because im using the compiler gcc(version 4.4.1 or something like that)
and i need i newer version of gcc compiler.
i tried to install it but it destroyed my codeblocks settings so i had to reinstall codeblocks.
so my compiler can't compile c++11 code.
please help me compile this code.