> Can anyone help me with this error in C++?

Can anyone help me with this error in C++?

Posted at: 2014-12-18 
Can you post the code that goes with this error?

EDIT: I just notice this at the end of your error: "T[m]={1}; "

In C, you can't declare an array of a variable type this way unless you jump through some small hoops first. If you wanted to you would have to use Alloc()/Malloc() to first allocate memory for the size of the data type of "m".

If you replaced T[m]={1}; with T[1]={1}; I bet you won't get an error.

Look up how to use "Alloc()" and "Malloc()". You can also search for "declare variable sized array". And take care to Free() your memory when you are done with it! The quickest way to never finding where your program Critical Faults is by losing a pointer. The second quickest way is by forgetting to free up allocated memory when you are done with it.

Hello,

I am really new to C++ and i have no idea why i am having this error.

The error is in the below:

fda.cpp: In function ‘int main()’:

fda.cpp:17:8: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]

T[m]={1};

thanks.