I find it very odd that your teacher won't explain this in a way you can understand. At any rate I'm not sure how useful I can be. Anything I say is basically my interpretation of what you've written meanwhile it's the teacher's assignment and the teacher is the best source for clarifacation you have.
My opinion is that there is enough information there to do at least 1 round of calculations, even if the line is an S line. In other words it's a stack of one thing.
First, the file starts with an S... so do I just ignore the first term since there is nothing above it?
10,000 shares * 3.71 = 37,100
The instructions say:
And since there are multiple S's, what exactly do I process?
A stack is a data structure. B lines will just become part of the stack. So if you encounter an S line, you have to add it to the stack and then display the output. To display the output, first you have to pop data off of the stack in turn. When you have popped off everything, you can continue reading the file.
2. Reads the data in the file into a stack. Each time an S is encountered process data if possible and display the results(see example below), otherwise display an error message.
I think it's up to you if you use the same instance or destroy the stack after dealing with each S line.
Would I need multiple stacks or is one enough?
Please include files with the .h extension. Your compiler knows what to do with them.
-Lastly, were supposed to use #include "stacks.ADT"