[cpp]很基础的问题,请高手解答

Science gis at 126.com
Thu Dec 14 16:54:54 CST 2006


int i = 1;
int j = (++i) + (++i) + (++i);
cout << j << endl;
为什么j输出10?
 
int i = 1;
int j = (i++) + (i++) + (i++);
cout << j << endl;
为什么输出3?
 
以上都是在VC6+SP6环境
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codingnow.com/pipermail/cpp/attachments/20061214/139ab2bf/attachment.html


More information about the Cpp mailing list