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 Ruby931031 at 2012-03-21 08:05:26 on Problem 1502
In Reply To:输入可以这样 Posted by:conan521 at 2011-08-31 22:20:12
赞一个!确实是个好办法!相当简单!
我一直在考虑用cin.peek()或者是atoi函数……
不过请问如果用C++的
if ( cin>>tmp )
       …………………………………………;
else 
      ………………………………………………;
该怎么写?没有成功读入tmp时怎么把那个"x"跳过?我试着写成char c;cin>>c;
不过貌似不可以……==!

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