devxlogo

April 25, 2000

Accessing Multiple Databases from a Datawindow

Question: Using a single datawindow, can I access data from multiple databases (Oracle and Sybase)? If not, can I use PowerBuilder to access it without having any intermediate table? Answer:

The unique() Algorithm

STL’s unique() algorithm eliminates all but the first element from every consecutive group of equal elements in a sequence of elements. unique() takes two forward iterators, the first of which

Signed Bit Fields

A bit field can be signed or unsigned. According to the C++ standard, a signed bit field may be represented in one of three ways: two’s complement one’s complement sign

Creating Immutable Constants

Although usually I don’t recommend using macros in C++ code, there are a few exceptions. One such exception is when you want to create a truly immutable constant. Consider the

Undoing a Macro

If you happen to define an object or a function or a constant whose name collides with a macro located elsewhere in a third-party header file, as in: // file

Take Advantage of Open Source Products

Open source products come with their source code files. Although you can usually install a ready-made executable file, you want to take advantage of the available source code files and

The Scope of Enumerators

The members of an enumerated type are called enumerators. For example: enum Direction { Up, // an enumerator Down // another enumerator }; int main() {} An enumerator’s scope is

Porting Code to a Different Compiler

I receive many questions from readers asking for guidance on how to port an existing C++ app to a different compiler or platform. Porting software can be very easy or