devxlogo

Tip Bank

CallByName

Question: Is there an equivalent of the CallByName function that returns a list of proprety and method names for an object? Answer: No, there isn’t. If you need that, you

RuleZero 1.2 for VID 6 Going Open Source

RuleZero 1.2, the easiest and fastest add-on tool for creating database-driven Web pages in Visual InterDev 6 is now free. You can get a copy from Vertigo Software’s site, www.vertigosoftware.com.

Handling string Exceptions

Several member functions of std::string might throw exceptions. For example, if you use a very large number to specify the initial storage size, string’s constructor will throw an exception: string

Iterators Aren’t Pointers

Suppose you define a the following list object and you need the address of one of its elements: std::list li; std::list ::iterator iter = li.begin(); In many contexts, iter functions

Calling a Member Function From a Destructor

It’s perfectly legal to call a member function?virtual or not?from a destructor. However, you should avoid calling a member function that accesses data members that have already been destroyed. For

The Order of Local Objects’ Destruction

On exit from a scope, destructors are called for all local automatic objects that are declared in that scope, in the reverse order of their declaration. For example: void f()

Understanding Default Initialization

A POD (plain old data) type is a union, struct or class with no user-declared constructors, no private or protected non-static data members, no base classes, and no virtual functions.

Understanding Zero Initialization

To zero-initialize an object of type T means that the memory storage occupied by the object is set to binary zeros. More precisely, if T is a built-in data type,