Absolute C++学习笔记2

来源:互联网 发布:家谱软件 注册码 编辑:程序博客网 时间:2024/05/04 14:44

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.

        

原创粉丝点击