Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

問VC++ 4.0 & 5.0 Console程式不合理的結果

0 views
Skip to first unread message

pokok

unread,
Mar 6, 1998, 3:00:00 AM3/6/98
to

#include <stdio.h>
#include <conio.h>

void main ()
{
unsigned short wId;

getch ();
printf ("Next\n");
scanf ("%d", &wId);
}

Run程式後Input:
1. 'a'
2. 123
3. 按RETURN

實際Output :
Next
a123

預期Output :
Next
123


--
海闊憑魚躍,天空任鳥飛
[k34
--
* Origin: ★ 交通大學資訊科學系 BBS ★ <bbs.cis.nctu.edu.tw: 140.113.23.3>

0 new messages