user-0 提问: 新手入门，求教一个简单的问题

回复:
user: user-1
content: 引用 9 楼 wplink 的回复:我搜了，没搜到  谷歌我又打不开（不小心删掉了goagent） 感谢感谢 84.15.64.35

user: user-0
content: 引用 7 楼 u012421456 的回复:4楼是对的 最好按着要求的格式写 int main() {         ////         return 0; }  --是自减1 其实这种问题，你可以自己通过搜索找到答案的我搜了，没搜到  谷歌我又打不开（不小心删掉了goagent） 感谢感谢

user: user-2
content: return 0不写是错误的，只不过编译器容忍了这个错误，你应该写上

user: user-3
content: //C++ Operators //  Operators specify an evaluation to be performed on one of the following: //    One operand (unary operator) //    Two operands (binary operator) //    Three operands (ternary operator) //  The C++ language includes all C operators and adds several new operators. //  Table 1.1 lists the operators available in Microsoft C++. //  Operators follow a strict precedence which defines the evaluation order of //expressions containing these operators.  Operators associate with either the //expression on their left or the expression on their right;    this is called //“associativity.” Operators in the same group have equal precedence and are //evaluated left to right in an expression unless explicitly forced by a pair of //parentheses, ( ). //  Table 1.1 shows the precedence and associativity of C++ operators //  (from highest to lowest precedence). // //Table 1.1   C++ Operator Precedence and Associativity // The highest precedence level is at the top of the table. //+------------------+-----------------------------------------+---------------+ //| Operator         | Name or Meaning                         | Associativity | //+------------------+-----------------------------------------+---------------+ //| ::               | Scope resolution                        | None          | //| ::               | Global                                  | None          | //| [ ]              | Array subscript                         | Left to right | //| ( )              | Function call                           | Left to right | //| ( )              | Conversion                              | None          | //| .                | Member selection (object)               | Left to right | //| ->               | Member selection (pointer)              | Left to right | //| ++               | Postfix increment                       | None          | //| --               | Postfix decrement                       | None          | //| new              | Allocate object                         | None          | //| delete           | Deallocate object                       | None          | //| delete[ ]        | Deallocate object                       | None          | //| ++               | Prefix increment                        | None          | //| --               | Prefix decrement                        | None          | //| *                | Dereference                             | None          | //| &                | Address-of                              | None          | //| +                | Unary plus                              | None          | //| -                | Arithmetic negation (unary)             | None          | //| !                | Logical NOT                             | None          | //| ~                | Bitwise complement                      | None          | //| sizeof           | Size of object                          | None          | //| sizeof ( )       | Size of type                            | None          | //| typeid( )        | type name                               | None          | //| (type)           | Type cast (conversion)                  | Right to left | //| const_cast       | Type cast (conversion)                  | None          | //| dynamic_cast     | Type cast (conversion)                  | None          | //| reinterpret_cast | Type cast (conversion)                  | None          | //| static_cast      | Type cast (conversion)                  | None          | //| .*               | Apply pointer to class member (objects) | Left to right | //| ->*              | Dereference pointer to class member     | Left to right | //| *                | Multiplication                          | Left to right | //| /                | Division                                | Left to right | //| %                | Remainder (modulus)                     | Left to right | //| +                | Addition                                | Left to right | //| -                | Subtraction                             | Left to right | //| <<               | Left shift                              | Left to right | //| >>               | Right shift                             | Left to right | //| <                | Less than                               | Left to right | //| >                | Greater than                            | Left to right | //| <=               | Less than or equal to                   | Left to right | //| >=               | Greater than or equal to                | Left to right | //| ==               | Equality                                | Left to right | //| !=               | Inequality                              | Left to right | //| &                | Bitwise AND                             | Left to right | //| ^                | Bitwise exclusive OR                    | Left to right | //| |                | Bitwise OR                              | Left to right | //| &&               | Logical AND                             | Left to right | //| ||               | Logical OR                              | Left to right | //| e1?e2:e3         | Conditional                             | Right to left | //| =                | Assignment                              | Right to left | //| *=               | Multiplication assignment               | Right to left | //| /=               | Division assignment                     | Right to left | //| %=               | Modulus assignment                      | Right to left | //| +=               | Addition assignment                     | Right to left | //| -=               | Subtraction assignment                  | Right to left | //| <<=              | Left-shift assignment                   | Right to left | //| >>=              | Right-shift assignment                  | Right to left | //| &=               | Bitwise AND assignment                  | Right to left | //| |=               | Bitwise inclusive OR assignment         | Right to left | //| ^=               | Bitwise exclusive OR assignment         | Right to left | //| ,                | Comma                                   | Left to right | //+------------------+-----------------------------------------+---------------+

user: user-0
content: 我只能看懂简单的回复。。。我刚学呢。。谢谢各位了。。。学完再重来一遍应该问题会少一点。。大家新年快乐

user: user-1
content: 4楼是对的 最好按着要求的格式写 int main() {         ////         return 0; }  --是自减1 其实这种问题，你可以自己通过搜索找到答案的

user: user-4
content: 举一个常用得main函数返回值得作用 :在linux系统中  C程序 常常和shell脚本集合 做一些事情，而shell调用C程序得时候  可以通过 echo $? 取出一个程序得返回值,而且返回值可以得到程序得执行状态,进行一些处理。这个时候就显得有用了。  第二点 楼上有人说 main 函数主动给你加retrun 0;在我记忆里， 这是好像是一个错误得说法，大多数编译器假设 在x86系统下 是返回ax 中得值 (如果不加return 0);

user: user-5
content: int main（）{...}本来就是一个要求有返回int型数据的一个函数，所以说要求有return 0；你写void main（）{...}就不用了。

user: user-6
content: 1.编译器自动给你加了return 0 2.“--”就是自减一的意思

user: user-0
content: 刚刚学习，不懂的就上来问下了，望不吝赐教啊。。感谢。。