天天看點

Absolute C++學習筆記2

The main topics of the chapter2 are BOOLEAN EXPRESSION,BRANCHING MECHANISMS and LOOPS.

          There is a point which would be worth to notice,the point is int value can be used as boolean.The 0 would be recognised as false,the others would be recognised as true.

          Branching mechanisms have two kinds of method,if--else and switch--case.

          The third part introduces while,do--while and for statements.In this part,the author also introduce the comma operator,which use to get the last value to itself.The difference between while and do--while is the do--while statement will run one time at least,the while not.They have the same result in the other environment.

繼續閱讀