Compiling the program below on windows with g++ file.cpp -std=c++11
#include<bits/stdc++.h>
using namespace std;
int main() {
int x = 0;
cout << x;
return 0;
}
gives an error that you can see on link below (unable to post error here due to stackoverflow's too much code in comparison to text constraint, sorry for posting it this way!)
https://drive.google.com/file/d/0B4w9GgJk2CmjdGg0TjluWElNRTQ/view
In file included from c:\mingw\lib\gcc\mingw325円.3.0\include\c++\bits\postypes.h:40:0,
from c:\mingw\lib\gcc\mingw325円.3.0\include\c++\iosfwd:40,
from c:\mingw\lib\gcc\mingw325円.3.0\include\c++\ios:38,
from c:\mingw\lib\gcc\mingw325円.3.0\include\c++\istream:38,
from c:\mingw\lib\gcc\mingw325円.3.0\include\c++\sstream:38,
from c:\mingw\lib\gcc\mingw325円.3.0\include\c++\complex:45,
from c:\mingw\lib\gcc\mingw325円.3.0\include\c++\ccomplex:38,
from c:\mingw\lib\gcc\mingw325円.3.0\include\c++\mingw32\bits\stdc++.h:52,
from template.cpp:1:
c:\mingw\lib\gcc\mingw325円.3.0\include\c++\cwchar:177:11: error: '::wcscat' has not been declared
using ::wcscat;
^
c:\mingw\lib\gcc\mingw325円.3.0\include\c++\cwchar:178:11: error: '::wcscmp' has not been declared
using ::wcscmp;
...
Any pointers where this is going wrong? (Using gcc 5.3)
melpomene
86.2k8 gold badges96 silver badges155 bronze badges
-
1Including that header is a bad idea in general: stackoverflow.com/questions/31816095/…melpomene– melpomene2017年05月13日 08:18:48 +00:00Commented May 13, 2017 at 8:18
1 Answer 1
use std=gnu++11
g++ file.cpp -std=gnu++11
answered May 13, 2017 at 8:15
tso
4,9523 gold badges24 silver badges35 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
lang-cpp