摘要: #include <iostream>//#include <stdio.h>using namespace std;int Vac = 3; int main(){ int i = 1, j = 2; int k = i+++j; cout << k << endl; //程序的输出结果是多少? system("pause"); return 0;} 根据C++运算符的优先级,表达式:i+++j;中,两个加号最先结合,即:++。其结合性是:从左到右(left to right),所以,表达式可以改写成:(i++)+j;。C+ 阅读全文
posted @ 2012-06-04 16:05 waynewuzhenbo 阅读(735) 评论(2) 推荐(0) 编辑
摘要: lvalue中的l指的是location,表示可以寻址。The "l" in value can be thought of as location.rvalue中的r指的是read,表示可读。The "r" in value can be thought of as "read" value.c++和++c的区别:c++即是返回a的值,然后变量a加1,返回需要产生一个临时变量类似于:{ int temp = c; c = c + 1; return temp; //返回右值 }++c则为:{ c = c + 1; return &a 阅读全文
posted @ 2012-06-04 10:56 waynewuzhenbo 阅读(189) 评论(0) 推荐(0) 编辑