Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //-----------------------------------------------------------------------------------------
- #include <windows.h>
- #include <crtdbg.h>
- #define ASSERT(expression) _ASSERTE(expression)
- int __stdcall WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
- {
- int* p = 0;
- ASSERT(p && "p should not be null");
- }
- //-----------------------------------------------------------------------------------------
- #include <windows.h> // needed for WinMain, otherwise the message will be in console
- #include <cassert>
- int __stdcall WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
- {
- int* p = 0;
- assert(p && "p should not be null");
- }
- //-----------------------------------------------------------------------------------------
- #include <atlbase.h>
- int __stdcall WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
- {
- int* p = 0;
- ATLASSERT(p && "p should not be null");
- }
- //-----------------------------------------------------------------------------------------
- #include <afx.h>
- int __stdcall WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
- {
- int* p = 0;
- ASSERT(p && "p should not be null");
- }
- //-----------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement