Hello, I'm very, very new at coding (so no big words please). I'm trying to work on a program for my C++ class which takes data stored in a file in the format:
ticketprice numberofticketssold
and outputs the total tickets sold and the total sale amount with two decimal places. There are four types of tickets and my .txt file is as follows:
250 5750
100 28000
50 35750
25 18750
When I run the program I get some ridiculously long number that isn't even close to what it should be. I've read the chapters relating to this and can't come up with what I'm doing wrong. Any and all feedback is greatly appreciated!
Thanks! You were right - I assumed since I was getting some sort of numerical output the file was opening but something else was wrong. As I said, beginner stupidity. Thanks again.