It might sound strange…but its true…I didn’t know I really like C++ till I handed in my assignment last week. Right now I am spending an hour or two everyday in the lab to learn as much C++ as I could 🙂
Here are some of the things I have learned this morning @ the Linux Lab:
Signed types can represent both positive and negative values, whereas unsigned types can only represent positive values (and zero). This can be specified by using either the specifier signed or the specifier unsigned before the type name.
The #define directive is not a C++ statement but a directive for the preprocessor; therefore it assumes the entire line as the directive and does not require a semicolon (;) at its end. If you append a semicolon character (;) at the end, it will also be appended in all occurrences within the body of the program that the preprocessor replaces.
In the case that the increase operator is used as a prefix (++a) the value is increased before the result of the expression is evaluated and therefore the increased value is considered in the outer expression; in case that it is used as a suffix (a++) the value stored in a is increased after being evaluated and therefore the value stored before the increase operation is evaluated in the outer expression.
Conditional operator ( ? ) condition ? result1 : result2
If condition is true the expression will return result1, if it is not it will return result2.