--------------------Configuration: CuteMoniter - Win32 Debug--------------------
Compiling...
MainMoniter.cpp
g:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2065: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' : undeclared identifier
        g:\program files\microsoft visual studio\vc98\include\xlocnum(479) : while compiling class-template member function 'class std::ostreambuf_iterator<char,struct std::char_traits<char> > __thiscall std::num_put<char,class std::ostreambuf_itera
tor<char,struct std::char_traits<char> > >::do_put(class std::ostreambuf_iterator<char,struct std::char_traits<char> >,class std::ios_base &,char,long) const'
g:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2143: syntax error : missing ')' before ';'
        g:\program files\microsoft visual studio\vc98\include\xlocnum(479) : while compiling class-template member function 'class std::ostreambuf_iterator<char,struct std::char_traits<char> > __thiscall std::num_put<char,class std::ostreambuf_itera
tor<char,struct std::char_traits<char> > >::do_put(class std::ostreambuf_iterator<char,struct std::char_traits<char> >,class std::ios_base &,char,long) const'
g:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2143: syntax error : missing ')' before ';'
        g:\program files\microsoft visual studio\vc98\include\xlocnum(479) : while compiling class-template member function 'class std::ostreambuf_iterator<char,struct std::char_traits<char> > __thiscall std::num_put<char,class std::ostreambuf_itera
tor<char,struct std::char_traits<char> > >::do_put(class std::ostreambuf_iterator<char,struct std::char_traits<char> >,class std::ios_base &,char,long) const'
g:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2059: syntax error : ')'
        g:\program files\microsoft visual studio\vc98\include\xlocnum(479) : while compiling class-template member function 'class std::ostreambuf_iterator<char,struct std::char_traits<char> > __thiscall std::num_put<char,class std::ostreambuf_itera
tor<char,struct std::char_traits<char> > >::do_put(class std::ostreambuf_iterator<char,struct std::char_traits<char> >,class std::ios_base &,char,long) const'
g:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2059: syntax error : ')'
        g:\program files\microsoft visual studio\vc98\include\xlocnum(479) : while compiling class-template member function 'class std::ostreambuf_iterator<char,struct std::char_traits<char> > __thiscall std::num_put<char,class std::ostreambuf_itera
tor<char,struct std::char_traits<char> > >::do_put(class std::ostreambuf_iterator<char,struct std::char_traits<char> >,class std::ios_base &,char,long) const'
ServiceCfg.cpp
g:\program files\microsoft visual studio\vc98\include\new(35) : error C2059: syntax error : 'string'
g:\program files\microsoft visual studio\vc98\include\new(35) : error C2091: function returns function
g:\program files\microsoft visual studio\vc98\include\new(35) : error C2809: 'operator new' has no formal parameters
g:\program files\microsoft visual studio\vc98\include\new(36) : error C2059: syntax error : 'string'
g:\program files\microsoft visual studio\vc98\include\new(37) : error C2091: function returns function
g:\program files\microsoft visual studio\vc98\include\new(37) : error C2556: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,const struct std::nothrow_t &)' : overloaded function differs only by return type from 'void *(__cdecl *__cdecl op
erator new(void))(unsigned int)'
        g:\program files\microsoft visual studio\vc98\include\new(35) : see declaration of 'new'
ServiceExam.cpp
Generating Code...
Error executing cl.exe.
Creating browse info file...CuteMoniter.exe - 11 error(s), 0 warning(s)

解决方案 »

  1.   

    #include <vector>
    #include <string>
    #include <list>
      

  2.   

    该在哪里using namespace std;啊老大
    我没有引用STL等类库啊
      

  3.   

    关键在于我没有引用STL库
    我不至于犯这么低级的错误吧^_^
      

  4.   

    没引用STL,那为何出表这些错误?
      

  5.   

    Sorry,我都忘了,的确是引用了STL,我没有using namespace std;
    但是我这样用std::string,可以吧
      

  6.   

    如果只是使用string的对象,用std::string当然可以,但是如果混和别的就要用std标识,或者是用using namespace std;
      

  7.   

    如果有用到了标准名字空间,建议using namespace std;
    而不要std::string,除非你用了几个名字空间。
      

  8.   

    还是用using namespace std名字空间的好,光用std::string,你很难保证别的地方没有用std的东西