Tip Bank

DevX - Software Development Resource

How to Use Some Variable in 2 EXE Programs

Question: Can you to tell me how to use a variable in other VB projects; i.e.,how to use some variable in two EXE-compiled VB projects? Answer: Because of the way

DevX - Software Development Resource

string::npos

Question: Could you please explain what the significance of string::npos is in the statement? someString.find_first_not_of(“0123456789”)==string::npos Answer: string::npos is a constant integer that holds the maximum value of characters that a

DevX - Software Development Resource

Returning Aggregates from a Function

Both C and C++ allow you to return by value aggregates, e.g., structs and unions, from a function. However, the runtime overhead of returning large objects by value can be

DevX - Software Development Resource

Designing a Generic Callback Dispatcher

In many applications, you need a generic class that invokes callback functions regardless of their class type. For example, an even-driven system that needs to call a member function of

DevX - Software Development Resource

Accessing a Class-Internal Type

Here’s a common error: you define a class-internal type, say an enum or typedef, and then try to use it as the return type of that class’s member function: class

DevX - Software Development Resource

Overcoming a Common Bug in

The standard functions isalpha(), isdigit(), isprint() etc., defined in the standard header or often fail to produce the right results because they assume that their arguments are of type ‘unsigned