January 29, 1999

DevX - Software Development Resource

When Are Pointers Equal?

Pointers to objects or functions of the same type are equal if and only if in they are both NULL: int *p1 = NULL, p2 = NULL; bool equal =

DevX - Software Development Resource

C++ and Multithreading

Standard C++ does not directly address the issue of multiprocessing, threads, and thread safety. This issue is implementation dependent, which enables vendors to decide whether or not to provide multithreading

DevX - Software Development Resource

Watch Out for “()” When Calling Subroutines

To call a subroutine, you can use the Call statement or simply the name of the subroutine: Call MyRoutine(firstParameter) ‘Or MyRoutine firstParameter Notice you don’t include the parentheses in the

DevX - Software Development Resource

Collect User Requirements With Scenarios

When talking to the user or subject-matter expert about an application’s requirements, write the requirements in the form of scenarios. A scenario both defines the requirement and provides a list

DevX - Software Development Resource

Browse VB Command as You Type

When you refer to an object in VB5, you get a drop-down list of that object’s properties and methods. But, did you know that the statements and functions of the

DevX - Software Development Resource

Use the Same Name for Your Error Handlers

Older versions of VB required a unique name for your error-handler labels in order to use On Error GoTo . You had to concatenate the module name and routine name

DevX - Software Development Resource

Find Your Constant or Enum Values

I use constants for things like control-array index numbers, but it’s a hassle to keep scrolling to the top of the module to remember the constant names. If you name

DevX - Software Development Resource

Get Your Graphics Here

If you extend a few AWT classes, you will eventually want to add images to enhance their appearance. Icons for buttons and your own logo in the corner of frames