Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between the ASSERT and VERIFY macros?

Answers were Sorted based on User's Feedback



What is the difference between the ASSERT and VERIFY macros?..

Answer / muthukumar. j

Both ASSERT and VERIFY macros behave in the same Manner in
debug Version.

But in Release version the Expression in the ASSERT is
ignored. And in Release version the Expression in the
VERIFY is evaluated. But not verified. Means the expression
is evaluated. And like dubug it is NOT stop the execution
if the expression evaluated to FALSE.

Is This Answer Correct ?    16 Yes 0 No

What is the difference between the ASSERT and VERIFY macros?..

Answer / 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

What is the difference between the ASSERT and VERIFY macros?..

Answer / satyabrata mishra

ASSERT() macro works in the Debug builds
VERIFY() macro works in Release builds.

Is This Answer Correct ?    2 Yes 10 No

What is the difference between the ASSERT and VERIFY macros?..

Answer / manoj

ASSERT for Debug.
Verify for Release

Is This Answer Correct ?    1 Yes 10 No

Post New Answer

More MFC Interview Questions

Whats is DDX & DDV in MFC?

1 Answers   HCL,


how to repaint when working with horizontal scroll bar

0 Answers  


how does conditionally close the Dialog Box ?

2 Answers   Infotech,


What four types of properties are supported by an ActiveX control?

1 Answers  


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

0 Answers   TCS,


List out the basic features of MFC.

4 Answers   Mphasis,


is there any class which is not derived from Cobject

11 Answers   Patni,


Difference between Cclint DC & Cpaint Dc

6 Answers   E Logic,


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,


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

0 Answers  


Explain the flow of SDI application?

8 Answers   Mphasis,


1)At run-time, you can change the icon by calling the LoadIcon() function?

2 Answers  


Categories