May 13, 1998

When dynamic_cast<> Fails

The dynamic_cast operator may convert an object to another related (derived or a base) object at run-time. When it fails to convert a pointer to the target pointer, it returns

A Mutable Object Member

When a data member is declared mutable, then it is legal to assign a value to it from a const member function. The following example may demonstrate when it is

Use derivation instead of type-fields

Whenever your class uses a type-field, as in the following case: class Internl { //internationalization aid Lang lg; //type field FontResource fonts public: enum Lang {English, Hebrew, Danish} Internl(Lang lang)

Load a Grid From a SQL Statement

Here is useful code for a generic routine to load a grid from anSQL statement. The example shown is for RDO and Sheridan’s grid,but works with minor modification for any