devxlogo

Tip Bank

STL Iterators are not Necessarily Pointers

Most implementations of STL (Standard Template Library) use pointers as the underlying representation of iterators. However, an iterator doesn’t have to be a pointer, and there’s a good reason for

A Workaround for Namespace-less Compilers

Since namespaces are relatively new in C++, some compilers do not support this feature yet. To workaround this lack of support, you can use struct holding static member functions: struct

Invoke “Open With …” Dialog Box

When launching a data file with the ShellExecute() function, Windows tries to find the associated application and open the data file with this application. But what happens if no association

SSTab vs. Option Buttons

Although VB’s SSTab control behaves as if each tab page is a container, it actually uses a single container for all tab pages. This can cause unexpected behavior if you

Deleting an Array Element

Conventional wisdom suggests that to delete an array element, you must move up all the subsequent elements to close the “gap” left by the deleted item. However, if the sequence

Beginning Swing-Based Applications

When you begin all Swing-based applications, you must set the look and feel and add a WindowListener so that when a user clicks on the exit box, the program exits.