Invalid Initializer

Got an error called "6 C:\Dev-Cpp\ARRAYS.CPP invalid initializer".

This is the first time I'm trying out arrays.

1
2
3
4
5
6
7
8
9
10
11
12
#include <iostream>
#include <cstdlib>

int main(int argc, char *argv[])
{
    int derp [4] = ( 9, 9, 5, 1337 );
    
    cout << derp;
    
    system("PAUSE");
    return EXIT_SUCCESS;
}
int derp [4] = { 9, 9, 5, 1337 };
@Cire ???!!!???!!!
{} is not ().
Thanks :)
C:\Dev-Cpp\ARRAYS.CPP


Don't use Dev-C++, its old, outdated, bug filled and no longer actively developed. Use something else, such as Code::Blocks. If you really want to stick with Dev-C++, then at least use wxDev-C++, as it is more updated and still being developed.
Topic archived. No new replies allowed.