What is the use of CObject::Dump function ?
Answers were Sorted based on User's Feedback
Answer / preeja
Dumps the contents of your object.When you write your own
class, you should override the Dump function to provide
diagnostic services for yourself and other users of your
class. The overridden Dump usually calls the Dump function
of its base class before printing data members unique to
the derived class.
Dump function should not print a newline character at the
end of its output.Dump is a const function, you are not
permitted to change the object state during the dump.
// example for CObject::Dump
void CAge::Dump( CDumpContext &dc ) const
{
CObject::Dump( dc );
dc << "Age = " << m_years;
}
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / abhijit
* intended to produce shallow snapshot
* should dump information about its members that are not
inherited
* can set depth detail through SetDepth()
* by default, information is dumped on trace window.
however, this may be altered in InitInstance():
afxDump.m_pFile = pFile;
cleanup code in ExitInstance():
afxDump.Flush();
afxDump.Close();
delete afxDump.m_pFile;
afxDump.m_pFile = NULL;
| Is This Answer Correct ? | 0 Yes | 6 No |
What is the use of UpdateData funciton ?
Explain StretchBlt and BitBlt
If i derive a new class from CObject what are the basic features my derived wil get ?
Does the application have more than one object? If Yes, Briefly explain.
What is LoadLibrary function returns?
what is the use of CCmdTarget?
how does the UIThread and worker thread communicates and handle events
What is the use of OninitDialog ?
I can i set size of integer variable should be fixed for different operating systems(Ex i want integer size is 2bytes in OS)
I have 2 threads. One thread prints odd numbers and the second thread prints even numbers. Now, I have to execute the threads alternatively so that i can output 1,2,3,4,5,6,..... write code for this?
How can server communicate with more than one client
Will there be any difference in the image buffer size if it is loaded in from CString to LPTSTR using GetBuffer()? lptstr = string.GetBuffer(0);