您的位置:首页 > 编程语言 > C语言/C++

1.1 Writing a Simple C++ Program

2016-06-24 16:04 676 查看
Writing a Simple C++ Program
 
int main()     
{
  return 0;
}
A function definition has four elements:
a return type,a function name,a(possibly empty)parameter list enclosed in parentheses,a function body.

 
Note
Note the semicolon at the end of the return statement.Semicolons mark the end of most statements in C++.They are easy to overlook but,when forgotten,can lead to mysterious
compiler
error messages.
 
Key Concept:Types
Types are one of most fundamental concepts in programming and a concept that we will come back to over and over in this Primer.A type defines both the contents of adata
element and the operations that are possible on those data.
    The data our programs manipulate are stored in variables and every variable has a type.When the type of a variable named v is T, we often say that
“v has type T”or,interchangeably,that
“v is a T.” 
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: