Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCString insertion operator faulty? Pin
Indrawati13-May-04 23:55
Indrawati13-May-04 23:55 
AnswerRe: CString insertion operator faulty? Pin
jmkhael13-May-04 23:59
jmkhael13-May-04 23:59 
AnswerRe: CString insertion operator faulty? Pin
toxcct14-May-04 0:00
toxcct14-May-04 0:00 
AnswerRe: CString insertion operator faulty? Pin
Anand Paranjpe14-May-04 0:46
Anand Paranjpe14-May-04 0:46 
AnswerRe: CString insertion operator faulty? Pin
David Crow14-May-04 2:44
David Crow14-May-04 2:44 
GeneralRe: CString insertion operator faulty? Pin
Mike Dimmick14-May-04 5:42
Mike Dimmick14-May-04 5:42 
GeneralRe: CString insertion operator faulty? Pin
David Crow14-May-04 5:46
David Crow14-May-04 5:46 
GeneralRe: CString insertion operator faulty? Pin
Mike Dimmick14-May-04 9:06
Mike Dimmick14-May-04 9:06 
I copied the OP's code into a new Win32 Console project in VC6 (selecting 'An application that supports MFC' from the Wizard). It produced the original output. Opening the project in VS.NET 2003, converting it and rebuilding produced the correct output.

The fault is that the compiler appears to be selecting the class member (of basic_ostream) operator<<(const void*) for some reason. It's definitely calling CString::operator LPCTSTR to get the pointer whether you include the explicit cast or not.

Have you upgraded to Visual Studio 6.0 Service Pack 6, and could this be a solution to the problem?

Stability. What an interesting concept. -- Chris Maunder
GeneralRe: CString insertion operator faulty? Pin
David Crow14-May-04 9:10
David Crow14-May-04 9:10 
AnswerRe: CString insertion operator faulty? Pin
shea-c415-Oct-09 12:14
shea-c415-Oct-09 12:14 
GeneralINTERFACING THE PABX WITH A COMPUTER Pin
Wisdom200413-May-04 23:49
Wisdom200413-May-04 23:49 
GeneralRe: INTERFACING THE PABX WITH A COMPUTER Pin
Michael P Butler14-May-04 0:24
Michael P Butler14-May-04 0:24 
GeneralTake benefit of serialize but... Pin
doctorpi13-May-04 23:43
doctorpi13-May-04 23:43 
GeneralRe: Take benefit of serialize but... Pin
doctorpi13-May-04 23:48
doctorpi13-May-04 23:48 
GeneralACCESSING DATABASES USING DIALOGUE FORMS INSTEAD OF DOCUMENT FORMS/VIEWS Pin
Wisdom200413-May-04 23:39
Wisdom200413-May-04 23:39 
GeneralGDI+ Pin
CuongVT13-May-04 23:36
CuongVT13-May-04 23:36 
GeneralVS.NET Classwizard Pin
RChin13-May-04 22:50
RChin13-May-04 22:50 
GeneralRe: VS.NET Classwizard Pin
Maxwell Chen13-May-04 22:54
Maxwell Chen13-May-04 22:54 
GeneralRe: VS.NET Classwizard Pin
RChin13-May-04 22:59
RChin13-May-04 22:59 
GeneralRe: VS.NET Classwizard Pin
Anthony_Yio14-May-04 1:26
Anthony_Yio14-May-04 1:26 
GeneralTurning off Runtime checks in VC7 Pin
Anonymous13-May-04 22:10
Anonymous13-May-04 22:10 
GeneralRe: Turning off Runtime checks in VC7 Pin
Anthony_Yio14-May-04 1:57
Anthony_Yio14-May-04 1:57 
GeneralMain MFC and its Threads Pin
sweep12313-May-04 22:00
sweep12313-May-04 22:00 
GeneralRe: Main MFC and its Threads Pin
jmkhael13-May-04 23:23
jmkhael13-May-04 23:23 
GeneralRe: Main MFC and its Threads Pin
sweep12314-May-04 0:26
sweep12314-May-04 0:26 

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.