Tip Bank

DevX - Software Development Resource

The replace() Algorithm

Another useful STL algorithm is replace(), which is defined in the standard header and has the following prototype: void replace (ForwardIterator start, ForwardIterator end, const T & old_value, const T

DevX - Software Development Resource

Bool Type Conversions

A value of type bool can be converted implicitly to a value of type int, with false becoming zero, and true becoming one. For example: bool b = false; int

DevX - Software Development Resource

The Future of long

On 32-bit platforms, int and long usually occupy the same size. Programmers use these types interchangeably when they need a 32-bit integer. However, on 64-bit architectures, long is often represented

DevX - Software Development Resource

Merging Two Lists

Merging two lists isn’t only a popular homework assignment; rather, this task is sometimes needed in real world programming as well. Fortunately, you don’t have to reinvent the wheel anymore.

DevX - Software Development Resource

Finding a SQL Builder Component

Question: I’m looking for an “SQL builder” component that I can plug into a VB application that is end-user-friendly. Essentially, I would like the component to allow users to use

DevX - Software Development Resource

Allocating Multidimensional Arrays

Question: I have two questions about arrays. I have a 2D array of floats. I want to init everything with 0.0f. There must be a better way than going through

DevX - Software Development Resource

Running an Image Viewer in a Window

Question: How can I run an image viewer in a window portion of a form in Visual FoxPro alongside a scrolling list box? Answer: Here is how to create a

DevX - Software Development Resource

Menus Using Virtual Functions

Question: What is giving me a redefinition of CMenuItems class error in this code? //cmenu.hclass CMenuItem { public: char title[81]; virtual void Do_Command(void)=0;};//*********************//CMDS.CPP Defines and initializes menu commands.#include #include #include