Click here to Skip to main content
16,011,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Comparing values Pin
Toni7811-Apr-03 22:28
Toni7811-Apr-03 22:28 
GeneralProblems with CListBox method use... Pin
Dr Soong10-Apr-03 15:32
Dr Soong10-Apr-03 15:32 
GeneralRe: Problems with CListBox method use... Pin
Kevein10-Apr-03 15:37
Kevein10-Apr-03 15:37 
GeneralRe: Problems with CListBox method use... Pin
Dr Soong10-Apr-03 16:24
Dr Soong10-Apr-03 16:24 
GeneralRe: Problems with CListBox method use... Pin
Rage10-Apr-03 23:20
professionalRage10-Apr-03 23:20 
GeneralFileDialog in Property Page Pin
dandy7710-Apr-03 14:33
dandy7710-Apr-03 14:33 
GeneralRe: FileDialog in Property Page Pin
Rage10-Apr-03 23:27
professionalRage10-Apr-03 23:27 
GeneralSTL with MFC templete, get errors like xlocnum(481) : error C2065, C2143 .. Pin
Kevein10-Apr-03 14:29
Kevein10-Apr-03 14:29 
Hello,
My project (MSVC++6, SP5) is under MFC and I use templete such as
CMap, CList, CArray, etc.
I also want to use a class that is written under STL, using such as string, vector, etc.

However, when I combine the class into my project, I find the compiler will get errors such as:

=======
c:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2065: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' : undeclared identifier
c:\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'
c:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2143: syntax error : missing ')' before ';'
c:\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'
c:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2143: syntax error : missing ')' before ';'
c:\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'
c:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2059: syntax error : ')'
c:\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'
c:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2059: syntax error : ')'
c:\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'
AcronymExtractorView.cpp
c:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2065: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' : undeclared identifier
c:\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'
c:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2143: syntax error : missing ')' before ';'
c:\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'
c:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2143: syntax error : missing ')' before ';'
c:\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'
c:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2059: syntax error : ')'
c:\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'
c:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2059: syntax error : ')'
c:\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'
MyCrawler.cpp
c:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2065: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' : undeclared identifier
c:\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'
c:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2143: syntax error : missing ')' before ';'
c:\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'
c:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2143: syntax error : missing ')' before ';'
c:\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'
c:\program files\microsoft visual studio\vc98\include\xlocnum(481) : error C2059: syntax error : ')'
c:\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'

=======

from google, I find one possible reasons at:

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarvc/html/msdn_stlfaq.asp

which it says things as:

vector<int, allocator<int="">> iV;
The problem is caused by the consecutive ">>" at the end of the declaration. The solution is to put a space between them, so the above becomes:

is causing the problem.
However, I don't see such thing in my program (at lease no such direct problem as above).
Does anyone know any other possible reasons and how to solve it?

Thanks a lot in advance.

Smile | :)
GeneralRe: STL with MFC templete, get errors like xlocnum(481) : error C2065, C2143 .. Pin
Kevein10-Apr-03 14:44
Kevein10-Apr-03 14:44 
GeneralRe: STL with MFC templete, get errors like xlocnum(481) : error C2065, C2143 .. Pin
Kevein10-Apr-03 14:49
Kevein10-Apr-03 14:49 
GeneralRe: STL with MFC templete, get errors like xlocnum(481) : error C2065, C2143 .. Pin
Rage10-Apr-03 23:17
professionalRage10-Apr-03 23:17 
GeneralRe: STL with MFC templete, get errors like xlocnum(481) : error C2065, C2143 .. Pin
Kevein11-Apr-03 5:58
Kevein11-Apr-03 5:58 
QuestionHow to supply a generated image to a HTML page in a CHtmlView Pin
luedi10-Apr-03 12:50
luedi10-Apr-03 12:50 
AnswerRe: How to supply a generated image to a HTML page in a CHtmlView Pin
Scott H. Settlemier10-Apr-03 15:43
Scott H. Settlemier10-Apr-03 15:43 
GeneralRe: How to supply a generated image to a HTML page in a CHtmlView Pin
luedi10-Apr-03 23:26
luedi10-Apr-03 23:26 
GeneralVisual Studio Upgrade? (to .net version) Pin
Peter Weyzen10-Apr-03 11:41
Peter Weyzen10-Apr-03 11:41 
GeneralRe: .net upgrade? Pin
John M. Drescher10-Apr-03 11:47
John M. Drescher10-Apr-03 11:47 
GeneralRe: Visual Studio Upgrade? (to .net version) Pin
Anders Molin10-Apr-03 12:34
professionalAnders Molin10-Apr-03 12:34 
GeneralRe: Visual Studio Upgrade? (to .net version) Pin
Chris Losinger10-Apr-03 14:00
professionalChris Losinger10-Apr-03 14:00 
GeneralRe: Visual Studio Upgrade? (to .net version) Pin
geo_m10-Apr-03 22:39
geo_m10-Apr-03 22:39 
GeneralRe: Visual Studio Upgrade? (to .net version) Pin
Peter Weyzen11-Apr-03 6:25
Peter Weyzen11-Apr-03 6:25 
GeneralGetting the file extension from an AppWizard generated application. Pin
Bruce Cleaver10-Apr-03 11:16
Bruce Cleaver10-Apr-03 11:16 
GeneralRe: Getting the file extension from an AppWizard generated application. Pin
Roger Allen11-Apr-03 1:43
Roger Allen11-Apr-03 1:43 
General"Open with..." dialog box Pin
Phil.Benson10-Apr-03 11:10
professionalPhil.Benson10-Apr-03 11:10 
GeneralRe: "Open with..." dialog box Pin
IceMatrix11-Apr-03 7:20
IceMatrix11-Apr-03 7:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.