What is the difference between the ASSERT and VERIFY macros?
Answer Posted / ctharam
ASSERT:-
--------
This function is available only in the Debug version of MFC.
Ctharam* tharamage = new Ctharam(21); //Ctharam is derived from CObject.
ASSERT(tharamage != NULL);
ASSERT(tharamage ->IsKindOf(RUNTIME_CLASS(Ctharam)));
// Terminates program only if tharamage is NOT a Ctharam*.
VERIFY:-
-------
1)
In the Debug version of MFC, evaluates its argument.
ex:- VERIFY(booleanExpression )
2)
In the Release version of MFC, VERIFY evaluates the expression
Ex:-
// get the display device context
HDC hdc;
VERIFY((hdc = ::GetDC(hwnd)) != NULL);
// give the display context back
::ReleaseDC(hwnd, hdc);
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Do you have an idea about MFC?
what is functioning of DIalodDataXchange ..?
How do I create a dialog box in mfc?
What is the difference between Struts and JSF? Pls list some most suitable differences.
plzz tell me what we can do and dont in tally ERP & sap business one?
What does mfc stand for?
what is the meaning of constant FILE EXCEEDS LENGTH LIMIT while loading from ps file to vsam in the jcl?
what message is sent to an application when the user presses the primary button?
List out the basic features of MFC.
2.create for 10 batch: Employee_Number Employee_name Employee_Dateofjoining Employee_address Employee_salary 1.select the employee name who deriving more than 10 thousand salary and joined before august 08. use structure and pointers
how to repaint when working with horizontal scroll bar
How to handle dynamic menus in mfc? What happens when client calls cocreateinstance?
I want recent paper pattern for HP company?
What is mfc class hierarchy?