Use Register variables to enhance performance
The C/C++ register keyword can be used as a hint to the compiler that the declared variable is to be accessed very often during program execution, and hence, should be
The C/C++ register keyword can be used as a hint to the compiler that the declared variable is to be accessed very often during program execution, and hence, should be
An object’s member functions (both virtual and non-virtual) can be called from its constructor. The invoked virtual is guaranteed to be the one defined in the current object (or higher,
A static member function in a class can access only other static members of a class or variables which are not members of its class. It can be invoked even
C++ supports Run-time Type Identification (RTTI), which enables detection of actual object type during program execution using the built-in typeid() operator. Here is an example: //file: classes.hclass base{ base(); virtual
In object-oriented programming (OOP), global objects are considered harmful. Particularly in C++, there’s even more reason to think twice before using them: a global object construction occurs before a program’s
A const member or a reference member cannot be initialized within an object’s constructor. Instead, they must be initialized in the constructor’s member-initializer list. Conceptually, mem-initialization takes place before the
Unions are used to minimize memory waste. For example, consider the following database-transaction class used to update a person’s data. The key can be either a unique ID number or
Question: What is the most cost-effective engine and method for licensing clients in client/server applications? Answer: For PowerBuilder applications, the runtime license for clients is free. You can have a
Question: How can I control the draw order (i.e., BringToFront, SendToBack) of datawindow objects dynamically created in the deatil band? Answer: At design time you can layer objects by using