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

你把scanf和cin混在一起用,当然会有问题

Posted by hawk at 2004-02-27 17:11:19 on Problem 1002
In Reply To:C++的输入有问题,会导致莫名的错误……气愤中! Posted by:Michelle at 2004-02-27 16:08:51
这不是c++的问题,还是你使用的问题啊
cin和scanf两种解决方案,选一用之就可以了,别混用
输出也一样
> 我用scanf做,这道题目就ac了。
> scanf("%d",&n);
> scanf("%s",s);
> 但是如果把上面的形式换成下面的,只要换一个,立马就WA!简直不知道为什么,太变态了!
> //cin>>n;
> //gets(s);

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