Article ID: 107428
Article Last Modified on 10/24/2003
void CPerson::Dump( CDumpContext &dc ) const
{
dc << "Begin dump of CPerson object"; // identify dump start
CObject::Dump( dc );
dc << "Name: " << m_name;
dc << "Age: " << m_years;
dc << "End dump of CPerson object"; // identify dump end
}
OutputDebugString("This");
OutputDebugString("output");
OutputDebugString("takes three lines.\n");
This output takes three lines.The code fragment below demonstrates how each insertion of debugging text into the afxDump context causes a new line to appear in the output window:
void CPerson::Dump( CDumpContext &dc ) const
{
CObject::Dump( dc );
dc << m_name << " is ";
dc << m_years << " years old.\n";
}
A call to myPerson.Dump(afxDump) produces the following output in the
Visual Workbench's output window:
a
CObject
at
$18FC80
FirstName LastName
is
30
years old.
The following is what is desired:
a CObject at $3917477E FirstName LastName is 30 years old.
Additional query words: newline afxDump 1.00 1.10
Keywords: kbbug kbfix kbide kbdebug KB107428