Wednesday, July 21, 2010

C++: Misc notes from part 1

Few misc things...

There is something called "operator precedence" that you need to know. In
this scheme , certain operators, such as parentheses and * and so on has
higher priority, or precedence from other operators. sounds familiar? Right
from mathematics - you do multiplication before doing addition, and you do
things in parenthesis before anything else. You'll encounter this much

The reason why I left out descriptions of comparison signs (less-than,
greater-than, etc.) was mostly because these are used for comparisons, as in
the case of conditional statements. Also, the double ampersands (&&) and
double pipes (||) are left out because they have special meanings later
9double ampersands means the left and right side is true (this and that),
while two pipes means one or the other (this or that)). We'll see the real
role of ampersand much later when we go into pointers. Speaking of pointers,
I have deliberately mentioned this briefly but left this one out. But you'll
see its march around memory fights later when we discuss it fully.

// JL

No comments:

Post a Comment