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 view class enables you to use an edit control as a view?

1 Answers  


What types of threads are supported by MFC framework?

2 Answers  


What is the difference between the ASSERT and VERIFY macros?

4 Answers  


How to setup a timer?

3 Answers   IBM,


What is the difference between hinsrtance and hprevinstance in WinMain function?

3 Answers  






What interface must be supported by an ActiveX control?

2 Answers  


How to handle dynamic menus in mfc? What happens when client calls cocreateinstance?

0 Answers  


Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A. Explain how a pointer to function can be declared in C++? B. List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header ("Include") Files.

3 Answers   ABC, HCL, Infosys,


What is the use of CObject::Dump function ?

4 Answers  


What is the difference between Extension DLL and Regular DLL?

6 Answers   GE,


what is the use of CCmdTarget?

4 Answers   Siemens,


What MFC base classes provide support for ActiveX controls?

2 Answers   Wipro,


Categories