函数调用
f(1,2,3)
算是一个expression吗? 看起来函数调用是能产生一个result,并且可以把函数调用作为参数进一步传给其他的函数来使用。
不确定… …
解决方案
8
是… 这些东西明明书上都会写啊
8
函数调用是一个表达式属于后缀表达式
8
一直以来。C,C++函数调用,就是表达式
包括
1)函数名调用函数,C,C++
2)普通函数指针调用函数,C,C++
3)函数引用调用函数 C++
4)成员函数指针,调用函数 C++
包括
1)函数名调用函数,C,C++
2)普通函数指针调用函数,C,C++
3)函数引用调用函数 C++
4)成员函数指针,调用函数 C++
8
典型的posfix-expression。
但是关语句毛线。没{}没;是什么语句?
但是关语句毛线。没{}没;是什么语句?
8
Types of Expressions
C++ expressions are divided into several categories:
Primary expressions. These are the building blocks from which all other expressions are formed.
Postfix expressions. These are primary expressions followed by an operator — for example, the array subscript or postfix increment operator.
Expressions formed with unary operators. Unary operators act on only one operand in an expression.
Expressions formed with binary operators. Binary operators act on two operands in an expression.
Expressions with the conditional operator. The conditional operator is a ternary operator — the only such operator in the C++ language — and takes three operands.
Constant expressions. Constant expressions are formed entirely of constant data.
Expressions with explicit type conversions. Explicit type conversions, or “casts,” can be used in expressions.
Expressions with pointer-to-member operators.
Casting. Type-safe “casts” can be used in expressions.
Run-Time Type Information. Determine the type of an object during program execution.
C++ expressions are divided into several categories:
Primary expressions. These are the building blocks from which all other expressions are formed.
Postfix expressions. These are primary expressions followed by an operator — for example, the array subscript or postfix increment operator.
Expressions formed with unary operators. Unary operators act on only one operand in an expression.
Expressions formed with binary operators. Binary operators act on two operands in an expression.
Expressions with the conditional operator. The conditional operator is a ternary operator — the only such operator in the C++ language — and takes three operands.
Constant expressions. Constant expressions are formed entirely of constant data.
Expressions with explicit type conversions. Explicit type conversions, or “casts,” can be used in expressions.
Expressions with pointer-to-member operators.
Casting. Type-safe “casts” can be used in expressions.
Run-Time Type Information. Determine the type of an object during program execution.