Improve Your Programming with Asserts

By Bruce D. Rosenblum

Dr. Dobb's Journal December 1997

m_bmpSplash.LoadDIBitmap ( IDB_SPLASH );
ASSERT( m_bmpSplash != NULL, "Bitmap not loaded");

Example 2: Do not assert resource failures. This code is incorrect because the error will not be handled when it occurs in the ship version.

Back to Article


Copyright © 1997, Dr. Dobb's Journal