Enabling NumLock on by DefaultTo have numlock turned on for each user: Start Regedit Go to HKEY_CURRENT_USER\Control...
The #error Preprocessor Directive During the preprocessing phase, you can report errors by using the #error preprocessor directive. For example,...
Does the Compiler Always Create a Default Constructor? The compiler creates a default construtor only in the following situations: * When...
Iterators Aren't Pointers Suppose you define a the following list object and you need the address of one of its elements: std::list <int>...
Why you shouldn't store auto_ptr objects in STL containers Most C++ users already know that they shouldn't use auto_ptr objects as elements of...
auto_ptr<>: your safe guard against memory leaks The Standard Library supplies the class template auto_ptr<> which automatically deallocates heap...
Beware of Aliasing Whenever your class contains pointers, references, or handles, you need to define a copy constructor and assignment operator....
Prefer References Over Pointers Even experienced C++ programmers who have prior experience with C tend to use pointers excessively whereas...
Uses of the ptrdiff_t Data Type C and C++ define a special type for pointer arithmetic, namely ptrdiff_t, which is a typedef of a...
Pointers to Members of a Template Class You can define a pointer to a class template member. For example, you can use the specialization...
No Pointer Arithmetics Outside Array Bounds! Sometimes it is tempting to let a pointer point to a location that is slightly beyond an array's...
Hide Function Pointer Declarations With a typedef Can you tell what the following declaration means? void (*p[10]) (void (*)() ); Only...
Declaring References to Functions You can declare a reference to a function, just like you can declare a pointer to a function. For example:...
Passing More Arguments to a Callback Function Callback functions have a fixed signature so you cannot alter the number or type of the arguments...
Separate names with a comma.