My mistake, i just realised there is a maximum line limit.
But what if no limit is given.
PS: Of course i was not planning to store all the input, just the current input.
Search found 4 matches
- Sun Apr 29, 2007 2:09 am
- Forum: Volume 101 (10100-10199)
- Topic: 10189 - Minesweeper
- Replies: 418
- Views: 125428
- Thu Apr 26, 2007 4:18 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10189 - Minesweeper
- Replies: 418
- Views: 125428
Reading a variable length input
Hi everyone.
I was looking at this problem and i cant figure a way to store all input without allocating memory dynamically. If somebody could help i would appreciate.
TIA
I was looking at this problem and i cant figure a way to store all input without allocating memory dynamically. If somebody could help i would appreciate.
TIA
- Sun Apr 15, 2007 1:39 pm
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 117471
Thanks i got accepted. I thougth i could use scanf just like std::cin.Spykaj wrote:Code: Select all
while(scanf("%d %d %d %d %d %d %d %d %d", &input[0], &input[1], &input[2], &input[3], &input[4], &input[5], &input[6], &input[7], &input[8])!=EOF)
- Sun Apr 15, 2007 1:30 am
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 117471
[102] Output limit excedeed
Code: Select all
Removed.
Problem solved, program was not ending at End of file (see the post below)
TIA