June 18, 1998

The C++ Keywords

The Standard C++ keywords are: asm auto bool break case catch char class const const_cast continue default delete do double dynamic_cast else enum explicit export extern false float for friend goto if int long mutable namespace new operator private public register reinterpret_cast return short signed sizeof static static_cast struct switch

A Using Declaration and a Using Directive

A namespace is a scope in which declarations and definitions are grouped together. In order to refer to any of these from another scope, a full qualified name is required. However, repeating the full qualified name over and over again is tedious, error prone and less readable. Instead, a using

What’s in a “deprecated feature”?

C++ has been around for more than 15 years. During that long period it has been significantly extended, improved, and standardized. One of the consequences of any standardization process is that old, dangerous, redundant, undesirable features are gradually removed. A good example for deprecated features in C++ is using int

Built-in types have a constructor

In standard C++ built-in types such as char, int and float can be initialized like any ordinary user-defined type: char *pc = new char(‘a’); int pi= new int(10); float pf = new float(0.333); This language extension was introduced to the Standard in order to be compatible with STL containers and

Standard Headers’ Names

All Standard C++ header files must be included in the following way: #include //note: no “.h” extension#include//…other #include statements That is, the “.h” extension should not be used. This technique applies to a subset of standard C header files as well, with the addition of the letter ‘c’ affixed to