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?
|