| ||||||||||
| 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 | |||||||||
你把scanf和cin混在一起用,当然会有问题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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator