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 is the difference between the SDI and MDI

3 Answers   Invensys,


What is primitive and non-primitive application?

2 Answers   HCL,


Tell me the different controls in MFC ?

5 Answers  


what is the updated verssion in vc++

3 Answers   Aspect,


How we call a dialog in another dialog?

2 Answers  






Types of DLL's

11 Answers   Invensys,


What are the special requirements for dialog box resources used in a form view?

2 Answers  


1)How to load an icon on a button as Dynamically ?

1 Answers   HCL,


what do you mean by psychic window?

2 Answers   Patni,


How you find memory leaks?

4 Answers   ABB,


1)dynamic creation of a Button ?

2 Answers   TCS,


1) create ToolTip in MFC?

2 Answers   HCL,


Categories