New to VC7,8, port from VC6 error points to STL

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Just got an MSDN subscription and have been installing VC8 and related apps.
Now I'm starting to port my VC6 dll code... get the following errors:
1>c:\program files\microsoft visual studio 8\vc\include\cstdio(37) : error
C2039: 'sprintf' : is not a member of '`global namespace''

1>c:\program files\microsoft visual studio 8\vc\include\cstdio(37) : error
C2873: 'sprintf' : symbol cannot be used in a using-declaration

1>c:\program files\microsoft visual studio 8\vc\include\cstdio(40) : error
C2039: 'vsprintf' : is not a member of '`global namespace''

1>c:\program files\microsoft visual studio 8\vc\include\cstdio(40) : error
C2873: 'vsprintf' : symbol cannot be used in a using-declaration

1>c:\projects\quadraspec\quadraspecbeta\software\quaddll_v8\quaddll.cpp(200)
: error C3861: 'sprintf': identifier not found

With a little research it looks like STL errors but makes no sense, why
sprintf and not sscanf, why vsprintf and not vprintf?

Also tried:
using namespace std;

With no effect,

and I tried:

std::sprintf( q.m_cXemASerialNumber, "%s", q.csBuff);

with the additional result:
1>c:\program files\microsoft visual studio 8\vc\include\cstdio(37) : error
C2039: 'sprintf' : is not a member of '`global namespace''

1>c:\program files\microsoft visual studio 8\vc\include\cstdio(37) : error
C2873: 'sprintf' : symbol cannot be used in a using-declaration

1>c:\program files\microsoft visual studio 8\vc\include\cstdio(40) : error
C2039: 'vsprintf' : is not a member of '`global namespace''

1>c:\program files\microsoft visual studio 8\vc\include\cstdio(40) : error
C2873: 'vsprintf' : symbol cannot be used in a using-declaration

1>c:\projects\quadraspec\quadraspecbeta\software\quaddll_v8\quaddll.cpp(199)
: error C2039: 'sprintf' : is not a member of 'std'
1>c:\projects\quadraspec\quadraspecbeta\software\quaddll_v8\quaddll.cpp(199)
: error C3861: 'sprintf': identifier not found


So now, Help!!!

Thanks in advance...


.



Relevant Pages

  • Re: New to VC7,8, port from VC6 error points to STL
    ... C2873: 'sprintf': symbol cannot be used in a using-declaration ... C2873: 'vsprintf': symbol cannot be used in a using-declaration ... using namespace std; ...
    (microsoft.public.vc.stl)
  • Re: New to VC7,8, port from VC6 error points to STL
    ... // testConsole.cpp: Defines the entry point for the console application. ... C2873: 'sprintf': symbol cannot be used in a using-declaration ... C2873: 'vsprintf': symbol cannot be used in a using-declaration ... : error C3861: 'sprintf': identifier not found ...
    (microsoft.public.vc.stl)
  • Re: Listing the most dangerous parts of C
    ... 8 C functions suffer from format string vulnerabilities ... printffprintfsprintf() snprintfvprintfvfprintfvsprintf() ... snprintf() is not a standard C function ...
    (comp.lang.c)
  • Re: Why no gzvprintf in zlib?
    ... Because not all libraries provide vsprintf / vsnprintf. ... sprintf or snprintf. ... the STDC implementation of gzprintf depends ...
    (comp.compression)
  • Re: string format
    ... Well printf, fprintf, sprintf(), snprintf, vprintf, vfprintf(), ... vsprintf(), vsnprintf(). ...
    (microsoft.public.vc.stl)