July 2000
Intermediate to advanced
1280 pages
34h 55m
English
In C++, unlike in other languages, the difference between an expression and an executable statement is quite small: Any expression can be converted to a statement by appending it with a semicolon. Here are some examples of expressions and executable statements.
x * y // valid expression that can be used in other expressions x * y; // valid statement in C++, but quite useless a = x * y // valid expression that can be used in others (do it with caution) a = x * y; // valid C++ statement, useful and common x++ // valid expression that can be used in others (do it with caution) x++; // valid C++ statement, common and useful foo() // call to a function returning a value (a valid expression) foo(); // call to a function ...
Read now
Unlock full access