What is the use of CObject::Dump function ?

Answers were Sorted based on User's Feedback



What is the use of CObject::Dump function ? ..

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

What is the use of CObject::Dump function ? ..

Answer / sonali d

Dump function is used for diagnostic testing

Is This Answer Correct ?    4 Yes 2 No

What is the use of CObject::Dump function ? ..

Answer / satyabrata mishra

for Error handling purposes.

Is This Answer Correct ?    0 Yes 6 No

What is the use of CObject::Dump function ? ..

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

Post New Answer

More MFC Interview Questions

what do you mean by psychic window?

2 Answers   Patni,


how does the UIThread and worker thread communicates and handle events

2 Answers   HCL,


what is functioning of DIalodDataXchange ..?

0 Answers  


What are the differences between MFC Exception macros and C++ exception keywords?

2 Answers  


is there any class which is not derived from Cobject

11 Answers   Patni,


What is CSingleDocTemplate?

1 Answers  


what is the use of CWinApp class?

3 Answers   Mphasis,


What view class enables you to use an edit control as a view?

1 Answers  


What is the difference between OnInitialUpdate and OnUpdate?

5 Answers  


What is the difference between Struts and JSF? Pls list some most suitable differences.

0 Answers  


Hi All, i am new for VC++ SDK. i want to get the IP Address of all the External device connected with my local machine.please give the code Regards, Praveer

1 Answers   TCS, Tech Mahindra,


I can i set size of integer variable should be fixed for different operating systems(Ex i want integer size is 2bytes in OS)

2 Answers   Invensys,


Categories