Search found 4 matches
- Fri Sep 22, 2006 8:52 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11098 - Battle II
- Replies: 11
- Views: 7291
- Tue Sep 05, 2006 8:28 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11078 - Open Credit System
- Replies: 12
- Views: 8850
- Sun Aug 06, 2006 4:48 am
- Forum: Volume 110 (11000-11099)
- Topic: 11057 - Exact Sum
- Replies: 50
- Views: 30492
- Tue Nov 08, 2005 4:00 am
- Forum: C++
- Topic: read til the end of line
- Replies: 7
- Views: 4058
I do something like
But you have to be sure that there is no trailing spaces (usually there arent).
Code: Select all
int a, b;
char c;
scanf("%d%c", &a, &c);
while(c != '\n' && b == 2)
b = scanf("%d%c", &a, &c);