Extended initializer lists only available with -std=c++0x or -std=gnu++0x

You may get error "Extended initializer lists only..." while you are compiling your C++ code. This error is encountered when you are trying to assign the elements of the array as:

Which you have already declared some where in your code as
    int array[10];  

You can only specify the initialization list during declaration of the array hence the error, if you want to assign the values somewhere else in your code except declaration then use the for loop or direct assignment at particular index such as
    for(int i =0; i< 10; ++i)
        array[i] = value;
    array[0] = value0;
    array[9] = value9;

Hope this helps...


Popular posts from this blog

Error : login failed on rabbitmq web-management console

MSMQ error : "A workgroup installation computer does not support the operation."

How to flash CWM Recovery to Samsung Galaxy SL( GT-I9003) using Odin