wxWidgets 101 之 4 Hard coded break point

#pragma message(BP "fix me")
__asm int 3;

/*
Value Usage
0xCDCDCDCD Allocated in heap, but not initialized
0xDDDDDDDD Released heap memory.
0xFDFDFDFD "NoMansLand" fences automatically placed at boundary of heap memory. Should never be overwritten. If you do overwrite one, you're probably walking off the end of an array.
0xCCCCCCCC Allocated on stack, but not initialized

*/
(pFoo + 2000),10

// checked_cast - Uses fast static_cast in Release build,
// but checks cast with an ASSERT in Debug.
// Typical usage:
// class Foo { /* ... */ };
// class Bar : public Foo { /* ... */ };
 // Foo * pFoo = new Bar;
 // Bar * pBar = checked_cast<;Bar *>;(pFoo);
 template <class TypeTo, class TypeFrom>
 TypeTo checked_cast(TypeFrom p)
 {
     ASSERT(dynamic_cast<TypeTo>(p));
    return static_cast<TypeTo>(p);
}

你可能感兴趣的:(wxWidgets 101 之 4 Hard coded break point)