devxlogo

October 12, 2002

Create installations with Visual Studio Installer

Introducing Visual StudioInstaller VisualStudio Installer is a free tool from Microsoft for creating installations forWindows applications. Visual Studio Installer is available in two Englishversions: version 1.0 works on Windows 98

Cleanup Your IF Statements with IN

IF statements can become quite long when you’re testing for multiple values. Using the IN expression can make them more readable.So, instead of typing: IF (@testvar = 1 or @testvar

Use enum Terminated with count

Always use an enum instead of defines and always close the list with an additional count. This makes life simpler and helps the compiler.Instead of defines: #define TypeA 0#define TypeB

OpenXML for Multiple Trips to the Database

Suppose you need to make multiple inserts (or updates or deletes) to a SQL Server database?for instance, inserting items in a shopping cart. In the past, you needed to loop

Fixed-length Strings Using Templates

Instead of writing a string class that contains a (char *), why not write a string class with a fixed char array? Of course, it would be repetitive if you

A Sparse Array of Any Type with Fast Access

A sparse array saves memory by not allocating memory for elements that are not initialized or to which you don’t need access. They’re quite easy using the STL map.This example

Output Data into a File

Use the following code: #include void main(){ char name[15]; double salary; ofstream outFile(“FileName.txt”, ios::in); while (outFile){ outFile >> name >> salary; }}