Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:请教一个问题,这样两种写法有什么区别吗?

Posted by zsc09_leaf at 2011-07-05 22:52:13 on Problem 2488
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator