每当我尝试在CLion中构建我的程序时,我都会遇到很多错误。
我正在粘贴下面的一些内容:
c:\mingw\include\sys/stat.h:173:14: error: '_dev_t' does not name a type
struct _stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:173:14: error: '_ino_t' does not name a type
struct _stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:173:14: error: '_mode_t' does not name a type
struct _stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:173:14: error: '_dev_t' does not name a type
struct _stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:173:14: error: '_off_t' does not name a type
struct _stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:173:14: error: 'time_t' does not name a type
struct _stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:173:14: error: 'time_t' does not name a type
struct _stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:173:14: error: 'time_t' does not name a type
struct _stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:180:13: error: '_dev_t' does not name a type
struct stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:180:13: error: '_ino_t' does not name a type
struct stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:180:13: error: '_mode_t' does not name a type
struct stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:180:13: error: '_dev_t' does not name a type
struct stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:180:13: error: '_off_t' does not name a type
struct stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:180:13: error: 'time_t' does not name a type
struct stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:180:13: error: 'time_t' does not name a type
struct stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:180:13: error: 'time_t' does not name a type
struct stat __struct_stat_defined( _off_t, time_t );
^
c:\mingw\include\sys/stat.h:188:17: error: '_dev_t' does not name a type
struct _stati64 __struct_stat_defined( __off64_t, time_t );
^
c:\mingw\include\sys/stat.h:188:17: error: '_ino_t' does not name a type
struct _stati64 __struct_stat_defined( __off64_t, time_t );
^
c:\mingw\include\sys/stat.h:188:17: error: '_mode_t' does not name a type
struct _stati64 __struct_stat_defined( __off64_t, time_t );
^
c:\mingw\include\sys/stat.h:188:17: error: '_dev_t' does not name a type
struct _stati64 __struct_stat_defined( __off64_t, time_t );
^
c:\mingw\include\sys/stat.h:188:17: error: '__off64_t' does not name a type
struct _stati64 __struct_stat_defined( __off64_t, time_t );
^
c:\mingw\include\sys/stat.h:188:17: error: 'time_t' does not name a type
struct _stati64 __struct_stat_defined( __off64_t, time_t );
^
c:\mingw\include\sys/stat.h:188:17: error: 'time_t' does not name a type
struct _stati64 __struct_stat_defined( __off64_t, time_t );
^
c:\mingw\include\sys/stat.h:188:17: error: 'time_t' does not name a type
struct _stati64 __struct_stat_defined( __off64_t, time_t );
^
c:\mingw\include\sys/stat.h:195:17: error: '_dev_t' does not name a type
struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
^
c:\mingw\include\sys/stat.h:195:17: error: '_ino_t' does not name a type
struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
^
c:\mingw\include\sys/stat.h:195:17: error: '_mode_t' does not name a type
struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
^
c:\mingw\include\sys/stat.h:195:17: error: '_dev_t' does not name a type
struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
^
c:\mingw\include\sys/stat.h:195:17: error: '__off64_t' does not name a type
struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
^
c:\mingw\include\sys/stat.h:195:17: error: '__time64_t' does not name a type
struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
^
c:\mingw\include\sys/stat.h:195:17: error: '__time64_t' does not name a type
struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
^
c:\mingw\include\sys/stat.h:195:17: error: '__time64_t' does not name a type
struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
^
In file included from c:\mingw\include\wchar.h:233:0,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:44,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\postypes.h:40,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\iosfwd:40,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ios:38,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\iostream:39,
from C:\Users\Chirag Kolani\Documents\SEM III\DSA\Practical 2_27-07-2016\N032_EXP2_27-07-2016.cpp:1:
c:\mingw\include\io.h:335:21: error: 'time_t' does not name a type
struct _wfinddata_t __struct_finddata_t (time_t, _fsize_t);
^
c:\mingw\include\io.h:335:21: error: 'time_t' does not name a type
struct _wfinddata_t __struct_finddata_t (time_t, _fsize_t);
^
c:\mingw\include\io.h:335:21: error: 'time_t' does not name a type
struct _wfinddata_t __struct_finddata_t (time_t, _fsize_t);
^
c:\mingw\include\io.h:336:24: error: 'time_t' does not name a type
struct _wfinddatai64_t __struct_finddata_t (time_t, __int64);
^
c:\mingw\include\io.h:336:24: error: 'time_t' does not name a type
struct _wfinddatai64_t __struct_finddata_t (time_t, __int64);
^
c:\mingw\include\io.h:336:24: error: 'time_t' does not name a type
struct _wfinddatai64_t __struct_finddata_t (time_t, __int64);
^
c:\mingw\include\io.h:362:24: error: '__time64_t' does not name a type
struct __wfinddata64_t __struct_finddata_t (__time64_t, __int64);
^
c:\mingw\include\io.h:362:24: error: '__time64_t' does not name a type
struct __wfinddata64_t __struct_finddata_t (__time64_t, __int64);
^
c:\mingw\include\io.h:362:24: error: '__time64_t' does not name a type
struct __wfinddata64_t __struct_finddata_t (__time64_t, __int64);
^
In file included from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\postypes.h:40:0,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\iosfwd:40,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ios:38,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\iostream:39,
from C:\Users\Chirag Kolani\Documents\SEM III\DSA\Practical 2_27-07-2016\N032_EXP2_27-07-2016.cpp:1:
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:146:11: error: '::fwide' has not been declared
using ::fwide;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:153:11: error: '::mbsinit' has not been declared
using ::mbsinit;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:164:11: error: '::vfwscanf' has not been declared
using ::vfwscanf;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:170:11: error: '::vswscanf' has not been declared
using ::vswscanf;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:174:11: error: '::vwscanf' has not been declared
using ::vwscanf;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:191:11: error: '::wcstof' has not been declared
using ::wcstof;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:198:11: error: '::wmemcmp' has not been declared
using ::wmemcmp;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:199:11: error: '::wmemcpy' has not been declared
using ::wmemcpy;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:200:11: error: '::wmemmove' has not been declared
using ::wmemmove;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:201:11: error: '::wmemset' has not been declared
using ::wmemset;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:208:11: error: '::wmemchr' has not been declared
using ::wmemchr;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar: In function 'wchar_t* std::wmemchr(wchar_t*, wchar_t, std::size_t)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:229:61: error: invalid conversion from 'const wchar_t*' to 'wchar_t*' [-fpermissive]
{ return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); }
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:228:3: note: initializing argument 1 of 'wchar_t* std::wmemchr(wchar_t*, wchar_t, std::size_t)'
wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar: At global scope:
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:248:11: error: '::wcstold' has not been declared
using ::wcstold;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:257:11: error: '::wcstoll' has not been declared
using ::wcstoll;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:258:11: error: '::wcstoull' has not been declared
using ::wcstoull;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:264:22: error: '__gnu_cxx::wcstold' has not been declared
using ::__gnu_cxx::wcstold;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:265:22: error: '__gnu_cxx::wcstoll' has not been declared
using ::__gnu_cxx::wcstoll;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:266:22: error: '__gnu_cxx::wcstoull' has not been declared
using ::__gnu_cxx::wcstoull;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:280:14: error: 'std::wcstof' has not been declared
using std::wcstof;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:283:14: error: 'std::vfwscanf' has not been declared
using std::vfwscanf;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:286:14: error: 'std::vswscanf' has not been declared
using std::vswscanf;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:289:14: error: 'std::vwscanf' has not been declared
using std::vwscanf;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:293:14: error: 'std::wcstold' has not been declared
using std::wcstold;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:294:14: error: 'std::wcstoll' has not been declared
using std::wcstoll;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:295:14: error: 'std::wcstoull' has not been declared
using std::wcstoull;
^
In file included from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ios:40:0,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\iostream:39,
from C:\Users\Chirag Kolani\Documents\SEM III\DSA\Practical 2_27-07-2016\N032_EXP2_27-07-2016.cpp:1:
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\char_traits.h: In static member function 'static int std::char_traits<wchar_t>::compare(const char_type*, const char_type*, std::size_t)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\char_traits.h:330:39: error: 'wmemcmp' was not declared in this scope
{ return wmemcmp(__s1, __s2, __n); }
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\char_traits.h: In static member function 'static const char_type* std::char_traits<wchar_t>::find(const char_type*, std::size_t, const char_type&)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\char_traits.h:338:37: error: invalid conversion from 'const char_type* {aka const wchar_t*}' to 'wchar_t*' [-fpermissive]
{ return wmemchr(__s, __a, __n); }
^
In file included from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\postypes.h:40:0,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\iosfwd:40,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ios:38,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\iostream:39,
from C:\Users\Chirag Kolani\Documents\SEM III\DSA\Practical 2_27-07-2016\N032_EXP2_27-07-2016.cpp:1:
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cwchar:228:3: note: initializing argument 1 of 'wchar_t* std::wmemchr(wchar_t*, wchar_t, std::size_t)'
wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
^
In file included from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ios:40:0,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\iostream:39,
from C:\Users\Chirag Kolani\Documents\SEM III\DSA\Practical 2_27-07-2016\N032_EXP2_27-07-2016.cpp:1:
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\char_traits.h: In static member function 'static std::char_traits<wchar_t>::char_type* std::char_traits<wchar_t>::move(std::char_traits<wchar_t>::char_type*, const char_type*, std::size_t)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\char_traits.h:342:40: error: 'wmemmove' was not declared in this scope
{ return wmemmove(__s1, __s2, __n); }
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\char_traits.h: In static member function 'static std::char_traits<wchar_t>::char_type* std::char_traits<wchar_t>::copy(std::char_traits<wchar_t>::char_type*, const char_type*, std::size_t)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\char_traits.h:346:39: error: 'wmemcpy' was not declared in this scope
{ return wmemcpy(__s1, __s2, __n); }
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\char_traits.h: In static member function 'static std::char_traits<wchar_t>::char_type* std::char_traits<wchar_t>::assign(std::char_traits<wchar_t>::char_type*, std::size_t, std::char_traits<wchar_t>::char_type)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\char_traits.h:350:37: error: 'wmemset' was not declared in this scope
{ return wmemset(__s, __a, __n); }
^
In file included from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ext\string_conversions.h:41:0,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2849,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\string:52,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\locale_classes.h:40,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\ios_base.h:41,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ios:42,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\iostream:39,
from C:\Users\Chirag Kolani\Documents\SEM III\DSA\Practical 2_27-07-2016\N032_EXP2_27-07-2016.cpp:1:
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib: At global scope:
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:201:11: error: '::lldiv_t' has not been declared
using ::lldiv_t;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:207:11: error: '::_Exit' has not been declared
using ::_Exit;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:211:11: error: '::llabs' has not been declared
using ::llabs;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:213:10: error: 'lldiv_t' does not name a type
inline lldiv_t
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:217:11: error: '::lldiv' has not been declared
using ::lldiv;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:228:11: error: '::atoll' has not been declared
using ::atoll;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:229:11: error: '::strtoll' has not been declared
using ::strtoll;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:230:11: error: '::strtoull' has not been declared
using ::strtoull;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:232:11: error: '::strtof' has not been declared
using ::strtof;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:233:11: error: '::strtold' has not been declared
using ::strtold;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:241:22: error: '__gnu_cxx::lldiv_t' has not been declared
using ::__gnu_cxx::lldiv_t;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:243:22: error: '__gnu_cxx::_Exit' has not been declared
using ::__gnu_cxx::_Exit;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:245:22: error: '__gnu_cxx::llabs' has not been declared
using ::__gnu_cxx::llabs;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:246:22: error: '__gnu_cxx::div' has not been declared
using ::__gnu_cxx::div;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:247:22: error: '__gnu_cxx::lldiv' has not been declared
using ::__gnu_cxx::lldiv;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:249:22: error: '__gnu_cxx::atoll' has not been declared
using ::__gnu_cxx::atoll;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:250:22: error: '__gnu_cxx::strtof' has not been declared
using ::__gnu_cxx::strtof;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:251:22: error: '__gnu_cxx::strtoll' has not been declared
using ::__gnu_cxx::strtoll;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:252:22: error: '__gnu_cxx::strtoull' has not been declared
using ::__gnu_cxx::strtoull;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib:253:22: error: '__gnu_cxx::strtold' has not been declared
using ::__gnu_cxx::strtold;
^
In file included from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ext\string_conversions.h:43:0,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2849,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\string:52,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\locale_classes.h:40,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\ios_base.h:41,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ios:42,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\iostream:39,
from C:\Users\Chirag Kolani\Documents\SEM III\DSA\Practical 2_27-07-2016\N032_EXP2_27-07-2016.cpp:1:
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdio:175:11: error: '::snprintf' has not been declared
using ::snprintf;
^
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdio:177:11: error: '::vscanf' has not been declared
using ::vscanf;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdio:178:11: error: '::vsnprintf' has not been declared
using ::vsnprintf;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdio:179:11: error: '::vsscanf' has not been declared
using ::vsscanf;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdio:185:22: error: '__gnu_cxx::snprintf' has not been declared
using ::__gnu_cxx::snprintf;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdio:186:22: error: '__gnu_cxx::vfscanf' has not been declared
using ::__gnu_cxx::vfscanf;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdio:187:22: error: '__gnu_cxx::vscanf' has not been declared
using ::__gnu_cxx::vscanf;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdio:188:22: error: '__gnu_cxx::vsnprintf' has not been declared
using ::__gnu_cxx::vsnprintf;
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdio:189:22: error: '__gnu_cxx::vsscanf' has not been declared
using ::__gnu_cxx::vsscanf;
^
In file included from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\string:52:0,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\locale_classes.h:40,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\ios_base.h:41,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ios:42,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\iostream:39,
from C:\Users\Chirag Kolani\Documents\SEM III\DSA\Practical 2_27-07-2016\N032_EXP2_27-07-2016.cpp:1:
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'long long int std::stoll(const string&, std::size_t*, int)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2873:31: error: 'strtoll' is not a member of 'std'
{ return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(),
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'long long unsigned int std::stoull(const string&, std::size_t*, int)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2878:31: error: 'strtoull' is not a member of 'std'
{ return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(),
^
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'long double std::stold(const string&, std::size_t*)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2892:31: error: 'strtold' is not a member of 'std'
{ return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'std::string std::to_string(int)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2899:45: error: 'vsnprintf' is not a member of 'std'
{ return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(int),
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'std::string std::to_string(unsigned int)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2904:45: error: 'vsnprintf' is not a member of 'std'
{ return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'std::string std::to_string(long int)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2910:45: error: 'vsnprintf' is not a member of 'std'
{ return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(long),
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'std::string std::to_string(long unsigned int)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2915:45: error: 'vsnprintf' is not a member of 'std'
{ return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'std::string std::to_string(long long int)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2921:45: error: 'vsnprintf' is not a member of 'std'
{ return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'std::string std::to_string(long long unsigned int)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2927:45: error: 'vsnprintf' is not a member of 'std'
{ return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'std::string std::to_string(float)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2936:45: error: 'vsnprintf' is not a member of 'std'
return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'std::string std::to_string(double)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2945:45: error: 'vsnprintf' is not a member of 'std'
return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'std::string std::to_string(long double)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2954:45: error: 'vsnprintf' is not a member of 'std'
return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'long long int std::stoll(const wstring&, std::size_t*, int)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2976:31: error: 'wcstoll' is not a member of 'std'
{ return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(),
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'long long unsigned int std::stoull(const wstring&, std::size_t*, int)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2981:31: error: 'wcstoull' is not a member of 'std'
{ return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(),
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'float std::stof(const wstring&, std::size_t*)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2987:31: error: 'wcstof' is not a member of 'std'
{ return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); }
^
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h: In function 'long double std::stold(const wstring&, std::size_t*)':
c:\mingw\lib\gcc\mingw32\4.9.3\include\c++\bits\basic_string.h:2995:31: error: 'wcstold' is not a member of 'std'
{ return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); }
我尝试寻找解决方案,我在这里得到了一个解决方案MinGW / CxxTest bizarre errors
所以,如果我改变
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
到
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
我的程序运行正常。
我希望CLion自动为我创建或导入的所有项目执行此操作。
知道怎么做吗?