| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:请教一个问题,这样两种写法有什么区别吗?In Reply To:请教一个问题,这样两种写法有什么区别吗? Posted by:Gyber at 2011-05-10 19:32:43 int main()
{
int a=5;
cout<<a--<<","<<a--<<endl;
a=5;
cout<<a;
a--;
cout<<","<<a;
cout<<endl;
}
--------
4,5
5,4
当然不一样,跟编译器也有关系,从后往前进栈的话第一个输出就会变成4,5。
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator