一元运算符和复制运算符都是右结合的(从右往左),其它运算符都是左结合的。& 和 * 都是一元运算符,所以是从右往左计算的。 123456789 #include<CString>using namespace std;int main(){ char s[2] = {'a', 'c'}; char *t = s; cout << *t++ << endl; cout << *t << endl; } 赞微海报分享
近期评论