Tutorial by Examples

A keyword denoting one of the two possible values of type bool. bool ok = true; if (!f()) { ok = false; goto end; }
A keyword denoting one of the two possible values of type bool. bool ok = true; if (!f()) { ok = false; goto end; }
C++11 A keyword denoting a null pointer constant. It can be converted to any pointer or pointer-to-member type, yielding a null pointer of the resulting type. Widget* p = new Widget(); delete p; p = nullptr; // set the pointer to null after deletion Note that nullptr is not itself a pointer. ...
Within a member function of a class, the keyword this is a pointer to the instance of the class on which the function was called. this cannot be used in a static member function. struct S { int x; S& operator=(const S& other) { x = other.x; // return a reference ...
An integer literal is a primary expression of the form decimal-literal It is a non-zero decimal digit (1, 2, 3, 4, 5, 6, 7, 8, 9), followed by zero or more decimal digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) int d = 42; octal-literal It is the digit zero (0) followed by zero or more octal dig...

Page 1 of 1