LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-04-2005, 09:16 AM   #1
Guest1234
Member
 
Registered: May 2004
Distribution: Ubuntu
Posts: 33

Rep: Reputation: 15
Printing to the debug window in VC++ .Net


I have this block of code in my C++ program:

CFile outFile;
CFileException* ePtr = new CFileException();

outFile.Open( tariffFile, CFile::modeCreate, ePtr );
if ( ePtr->m_cause != CFileException::none ) {
cerr << "Could not create file";
exit( 1 );
}

When I run the program, it shows me in the Output-Debug window this message:

"The program '[3464] Hotel.exe: Native' has exited with code 1 (0x1)."

But it doesn't show me the "Could not create file" message.
My question is how do I print to the Output-Debug window in VC++ .Net?
 
Old 06-08-2005, 12:23 AM   #2
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
I think you are looking for the OutputDebugMessage function, one of the Win32 APIs.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me, how to debug this? lmmix Programming 1 03-03-2005 07:21 AM
[debug]what does the following debug information mean icoming Programming 21 06-08-2004 02:13 AM
Printing window under System Tools closes csross Red Hat 2 03-09-2004 07:10 AM
Plz debug this... balanagireddy Linux - Newbie 3 02-03-2004 04:17 PM
freshrpms.net & rpmfind.net are down! JoeyJoeJo General 4 08-28-2003 05:05 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration