Tip Bank

DevX - Software Development Resource

Determining Variable Length

Question: How do I test the number of ‘characters’ contained within a given variable? Answer: Try this: Debug.Print “Length: ” & Len(CStr(X)) Once you convert a variable to a string,

DevX - Software Development Resource

Performance of Joined Tables

Question: I have several tables with the same structure and I’m trying to combine them all into one unique table. But I’m worried about performance because each table has a

DevX - Software Development Resource

SQL Comments

Question: Can I insert comments inside a SQL query, like &#47&#42 &#42&#47 and &#47&#47in C++? Answer: SQL supports &#47&#42 and &#42&#47 for comments inside stored procedures and queries. You also

DevX - Software Development Resource

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

DevX - Software Development Resource

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

DevX - Software Development Resource

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

DevX - Software Development Resource

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

DevX - Software Development Resource

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