devxlogo

Tip Bank

Class Scoped Constants

Question: Is there a better way to scope constant values within a class other than by using “enum”? class Foo {public: enum { valueOne = 1, valueTwo = 2 }

Informix OLE DB Provider

Question: I have IDS 7.31.UC2A and I want to register Informix OLE DB Provider on this database server. I need the %INFORMIXDIR%etccoledbp.sql script for running it against the sysmaster. Can

Informix ODBC Drivers 3.31

Question: I am currently running Informix Dynamic Server 2000 version 9.20 TC1 on an NT server, Service Pack 6a. I have existing Visual Basic 5 applications that are using ADO

Generate a Random Whole Number in JavaScript

You can generate random numbers in JavaScript using the Math.random() method. This function returns a fractional random number between 0 and 1. Unlike other languages, JavaScript will initialize a random

Where Are Exception Objects Stored?

Consider the following program: class Exception {}; int main() { try { throw Exception(); // where is the exception stored? } catch( Exception & ex) // catch by reference {}

Heap or Free-Store?

The terms heap and free-store are used interchangeably when referring to dynamically allocated objects. Are there any differences between the two? Technically, free-store is an abstract term referring to unused

Validating Data Entries

Suppose you have an application that reads input from the keyboard. How can you detect whether alphabetic data is being entered into an integer field from a cin statement? The