|
-
June 7th, 1999, 09:57 AM
#1
ASSERT vs. _ASSERT vs. _ASSERTE
I've seen some code using the ASSERT macro and other code using the _ASSERT and _ASSERTE macros. Can anyone shed some light on what their difference are and which one(s) should be used?
Thanks,
Alvaro
-
June 7th, 1999, 10:04 AM
#2
Re: ASSERT vs. _ASSERT vs. _ASSERTE
ASSERT is an MFC macro, where as _ASSERT/_ASSERTE are defined in CRTDBG.H (C Runtime Library). _ASSERT is the same as ASSERT where as _ASSERTE will show the expression in the debug log.
HTH,
Chris
-
June 7th, 1999, 10:12 AM
#3
Re: ASSERT vs. _ASSERT vs. _ASSERTE
So do you recommend I always use _ASSERTE?
-
June 7th, 1999, 11:38 AM
#4
Re: ASSERT vs. _ASSERT vs. _ASSERTE
Using _ASSERTE generates more overhead for your Debug version because every expression in _ASSERTE needs to be stored in the exe as a string. I just use ASSERT from MFC and it gives you the file & line number which is enough information to find out where the problem is.
HTH,
Chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|