C++ inherited basic data type, variable name, statement, expression,
and operator, control flow, function, file, head file and library, array,
pointer and structure from C language. C++ is subset of C, so any C
programmes can be compiled by C++.
Duration and scope are two different conceptions. there are three
durations 1)automatic 2)static and 3)dynamic. there are three scopes
1) global 2) file(translation unit) and 3) local. In C++, We can usenamespace to add another more scopes.
Compared with C language, C++ include two extensions, one is
template, one is OOP.
Prefer Preincrement (++i), especially in for loop. When you use
++i or i++ inside expression, there are differences. Otherwise, there is
no differences.
How to understand *p++? 1) Precedence of prefix ++ and * is same. Associativity of both is right to
left. 2) Precedence of postfix ++ is higher than both * and prefix ++.
Associativity of postfix ++ is left to right.