Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 450 Bytes

chapter1.md

File metadata and controls

15 lines (13 loc) · 450 Bytes

第1章 开始

  • 运行GNU编译器的命令是g++:

      $ g++ -o prog1 prog1.cc
    	// -o 是编译器参数,指定了可执行文件的文件名。
    
  • 运行微软Visual Studio 2010编译器的命令未cl:

      C:\Users> cl /EHsc prog1.cpp
      //命令cl调用编译器,/EHsc是编译器选项,用来打开标准异常处理。
    
  • 作用域运算符:::

  • 注释界定符不能嵌套

  • 控制流

    • while语句
    • for语句
    • if语句