devxlogo

June 26, 2001

Automatically Select the Radio Button

Make the width of the radio option button a lot wider than the caption text it holds. Next, position a textbox between the end of the caption and the actual

Conditional Compilation

In many cross-platform applications, you have code sections that — depending on the target OS and compiler — need to be either concealed or compiled. For example, code that uses

Limitations of reinterpret_cast

A reader tried to cast a nonstatic member function of a certain class to void*, as in the following example: class A{public: void func();};void *pmf = reinterpret_cast < void *>

Pointers to const Member Functions

The const-ness of a member function is an integral part of its type. The following class defines two member functions, f(), g(), which have the same return type and parameter

A VBScript Hit Counter

I created this Hit Counter to keep track of the use of our Company Intranet. On the SQL Server (in our case MSSQL 7), you will need to have a

Dynamic Constants

In applications that cannot be recompiled (e.g., apps that are installed on a customer’s machine as binaries only), values of constants may change occasionally. For example, exchange rates and the

Leading Blanks in Input

By default, std::cin ignores leading whitespaces when it reads input from the keyboard or file. For example, if you execute the following statement: char name[10];cin>>name; and the user enters the