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

How we can findout Memoryleaks, In what way it can be avoided

6 Answers   Infosys,


How do you change the properties for a tree view control that is part of the CTreeView class?

1 Answers  


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

3 Answers  


If application hangs while SendMessage is waiting for the result, how you handle it?

2 Answers  


1.Get string1,string2,string3 1.add string1 and 2,string1 and 3. 2.replace vowels with T 3.count number of T. 4.remove T 5.COPY string1 to stringf. 6.restore string1. print the following 1.Number of T 2.StringF 3.string1+string2+string3 Use pointers and functions

1 Answers  


how does conditionally close the Dialog Box ?

2 Answers   Infotech,


What is model and modeless dialog box ? Give some examples?

2 Answers   Mphasis,


What is the difference between regular dlls and extended dlls?

2 Answers  


What is CArchive class dowes?

4 Answers  


What does mfc stand for?

0 Answers  


Difference between Debug and Release versions?

4 Answers  


how do u identify RTTI in vc++

4 Answers   Siemens,


Categories