1

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
asked May 13, 2017 at 8:06
1

1 Answer 1

2

use std=gnu++11

g++ file.cpp -std=gnu++11
answered May 13, 2017 at 8:15
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.