user-0 提问: 新手求解

回复:
user: user-1
content: 代码是对的，换个IDE吧。 http://blog.csdn.net/cometnet/article/details/19551125

user: user-2
content: 代码没有问题

user: user-3
content: 半角全角问题

user: user-4
content: 偶遇到类似问题都是用 “每次用/*...*/注释掉不同部分再重新编译，直到定位到具体语法出错的位置。” 的方法解决的。

user: user-0
content: 补齐代码 In file included from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\ios:40:0,                  from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\ostream:38,                  from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\iostream:39,                  from C:\Users\Administrator\ClionProjects\sss\main.cpp:1: c:\mingw\lib\gcc\mingw32\5.3.0\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\5.3.0\include\c++\bits\char_traits.h:373:33: error: 'wmemmove' was not declared in this scope   return wmemmove(__s1, __s2, __n);                                  ^ c:\mingw\lib\gcc\mingw32\5.3.0\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\5.3.0\include\c++\bits\char_traits.h:381:32: error: 'wmemcpy' was not declared in this scope   return wmemcpy(__s1, __s2, __n);                                 ^ c:\mingw\lib\gcc\mingw32\5.3.0\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\5.3.0\include\c++\bits\char_traits.h:389:30: error: 'wmemset' was not declared in this scope   return wmemset(__s, __a, __n);                               ^ mingw32-make.exe[3]: *** [CMakeFiles/sss.dir/main.cpp.obj] Error 1 CMakeFiles\sss.dir\build.make:62: recipe for target 'CMakeFiles/sss.dir/main.cpp.obj' failed CMakeFiles\Makefile2:66: recipe for target 'CMakeFiles/sss.dir/all' failed mingw32-make.exe[2]: *** [CMakeFiles/sss.dir/all] Error 2 mingw32-make.exe[1]: *** [CMakeFiles/sss.dir/rule] Error 2 CMakeFiles\Makefile2:78: recipe for target 'CMakeFiles/sss.dir/rule' failed Makefile:117: recipe for target 'sss' failed mingw32-make.exe: *** [sss] Error 2

user: user-0
content: 补齐代码 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\5.3.0\include\c++\cwchar:44,                  from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\postypes.h:40,                  from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\iosfwd:40,                  from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\ios:38,                  from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\ostream:38,                  from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\iostream:39,                  from C:\Users\Administrator\ClionProjects\sss\main.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\5.3.0\include\c++\bits\postypes.h:40:0,                  from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\iosfwd:40,                  from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\ios:38,                  from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\ostream:38,                  from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\iostream:39,                  from C:\Users\Administrator\ClionProjects\sss\main.cpp:1: c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:146:11: error: '::fwide' has not been declared    using ::fwide;            ^ c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:153:11: error: '::mbsinit' has not been declared    using ::mbsinit;            ^ c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:198:11: error: '::wmemcmp' has not been declared    using ::wmemcmp;            ^ c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:199:11: error: '::wmemcpy' has not been declared    using ::wmemcpy;            ^ c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:200:11: error: '::wmemmove' has not been declared    using ::wmemmove;            ^ c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:201:11: error: '::wmemset' has not been declared    using ::wmemset;            ^ c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:208:11: error: '::wmemchr' has not been declared    using ::wmemchr;            ^ c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar: In function 'wchar_t* std::wmemchr(wchar_t*, wchar_t, std::size_t)': c:\mingw\lib\gcc\mingw32\5.3.0\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\5.3.0\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)    ^