March 17, 1998

Indirectly working with a structure in C++

Question: I am trying to create a class that can be given the pointer to a structure. The class has other means to know what goes into the structure, but it does not know the names of the elements within the structure. By using just the address and knowing the

Doubling Quotes in SQL Server

This routine parses a string and returns an equivalent string where all the instances of a given substring are doubled. This is especially useful for doubling quotes within SQL statements to be passed to Access or other database engines that expect double quote marks to represent a single quote mark:

Enhancing Vector’s Performance

Standard vector dynamically allocates the required amount of memory it needs; which saves you the bother of memory management. However, letting vector acquire additional memory slowly one chunk after another is unacceptable under real-time constraints. But this doesn’t mean you have to abandon vector yet. In order to avoid the

Avoid name conflict by using namespaces

In large-scale software projects, short and elegant names for types and functions are problematic because they can cause a name conflict, i.e., the same name is used more than once to define distinct types. In order to avoid this, people tend to use various affixes in their code, thus making

A Button Constructor for Java 1.1

With JDK 1.1, you can define an action command String for a Button that is independent of the text displayed in the Button. At the least, this enables you to separate the testing for which Button has been pressed from the spelling of the label. At best, it helps keep