Declaring Pointers to Member Functions Pointers to member functions consists of the member function's return type, the class name followed by ::,...
Declaring Pointers to Data Members Although the syntax of pointers to members may seem a bit confusing at first, it is consistent and resembles...
Constant pointers There are cases when you need to define a constant pointer to a variable/object; for instance, when taking a function address,...
Consider a simple EXE COM server, FooServer. Let's assume FooServer exposes an object Foo that has a method Bar: IFoo = interface procedure...
The purpose of this tutorial is to give you an idea on how to create a COM Server using ATL, and then being able to call the server from both a...
Overloaded Operators May Not Have Default Parameters Unlike ordinary functions, overloaded operators cannot declare a parameter with a default...
Determine Object Size Without Using the sizeof() Operator The sizeof() operator gives you the number of bytes required for storing an object. It...
Testing the Copy Constructor and the Assignment Operator You have written a test program for your class X, and everything worked fine. How did...
Using the Volatile Keyword to Avoid Failures When compiling a program, the compiler adds some optimizations that may cause your application to...
Notes about the system() Function The system() function (declared in <cstdlib>) launches another program from the current program. As opposed to...
Access a Class Member Function Without Creating a Class Object In some cases, it is possible to call a class member function without creating the...
Negative Numbers Represented in C++ You probably know that integers are represented in binary--in base 2. This is pretty straightforward for...
Debugging the Memory Leaks in MS VC++ 6.0 The failure to deallocate previously allocated memory is known as a memory leak. A memory leak is one...
inline vs. __forceinline MS Visual C++, as well as several other compilers, now offer non-standard keywords that control the inline expansion of...
Scope of Variables Declared in for() The new ANSI C++ standard specifies that variables declared as in for(int i=1; ...) have a scope local to...
Separate names with a comma.