I asked this before but didn't get an answer so I went to talk to my "professor" and he just about made me want to quit programming :( . So a little help would go great lenghs to salvaging this day.
Basically I have to right a program that reads stock transactions and then adds them to queue or sells them, simple enough. The problem is that I need set up some kind of a loop that will read in all the transactions. I have plenty of experince doing this with files by running till EOF. But I am not allowed to use file streams. All input will be through cins and the input will come through file redirection. Again I could do this but I will not know the number of transactions that will be entered. So how can I setup a program that will read all the input when the number of records is unknown? Any help would be greatly appreciated. Thanks.