c++ - How do i enable 'std=c++0x' from command line? -
i trying generate random numbers following discrete distribution , found link:
http://www.cplusplus.com/reference/random/discrete_distribution/
i compiled example given them , got error
c:\users\anand\desktop>g++ random.cpp -o rand in file included c:\mingw\bin\../lib/gcc/mingw32/4.6.2/include/c++/random:3 5:0, random.cpp:3: c:\mingw\bin\../lib/gcc/mingw32/4.6.2/include/c++/bits/c++0x_warning.h:32:2: err or: #error file requires compiler , library support upcoming iso c++ standard, c++0x. support experimental, , must enabled -std=c++0x or -std=gnu++0x compiler options. random.cpp: in function 'int main()':
this tells need enable '-std=c++0x'. can done in ide how do via cmd?
like this:
g++ -std=c++0x random.cpp -o random.exe
for worth, compiler quite out of date. update modern version.
Comments
Post a Comment