I want to take integer inputs separated by spaces and terminated by newline character. suppose the user will be inserting integers this way
123 566 789 45 34 8999 341 57 67 and then the user presses enter.
so the program will read all the integers when the user presses enter. The integers will be put into a linked list.
Note: 1. I dont want to do any parsing(first taking them as string and then separating the integers).
2. I could use an end condition like enter -1 to stop taking inputs, but dont like that idea either.
The thing is i m trying to make a electronic menu driven index, where there is a binary search tree and each treenode contains a word and a linked list of integers to hold the pages where the word appears in. I will first prompt the user for a word and then for the page numbers. But i need to read the inputs(page numbers) in a smart and convenient way. Let me know if u guys can help me with that.