









Boolean Literals
The keywords false and true are Boolean literals that evaluate to 0 and 1 respectively. Note that in other programming language, VB for instance, false equals -1 and true equals
The keywords false and true are Boolean literals that evaluate to 0 and 1 respectively. Note that in other programming language, VB for instance, false equals -1 and true equals
C++ allows casting a pointer to member functions of one type to another pointer to member, as long as the signatures of the two match. However, the results of such
Here’s a topic that was recently discussed at the Standardization committee. Suppose we have the following enum type: enum Stat { good, bad}; Is it legal to use the enumerator
Does your C++ compiler accept the following code? char s[3]=”abc”; // illegal in C++, no place for ” The standard requires that the size of a char array initialized with
The implementation ensures that functions having an exception specification should throw only exceptions that are listed in their exception specification. For example: class X{};class Y{};void f() throw X{ throw Y();
In a previous tip, http://www.devx.com/free/tips/tipview.asp?content_id=1585 , I explained the concept of lvalues and rvalues. Binding a reference to an rvalue is allowed as long as the reference is const. The
The name of the executable is stored in the string argv[0]. To access it, declare your main() function as follows: int main(int argc, char ** argv) Even if the application
It may be tempting to squeeze an extra pint of performance by removing all debug information from the release version. However, it’s recommended to leave minimal debugging info even in
The interface of a class consists of its public members. Usually, private members represent implementation details and are not exposed to other classes and users. Private members can be member