My project for my C++ class requires that I take a bunch of weather data. It's a ton of lines so I won't include all of the text file, but here's a sample of it:
The first column is snowfall and the second is total precipitation. I have to find things like mean and median with the data, but that's not an issue as I can do math fine. I just don't know how to input all of that data into an array. I was sick and missed class when they went over this so I'm compeltely lost. Basically what I need is help with
1. creating an array that can intake a ton of lines
2. taking the lines from the text file into an array
Jump to Post
This little example of simple file input from a well ordered (valid) file (of all valid data) ...
// getFileWeatherData // /* My project for my C++ class requires that I take a bunch of weather data. It's a ton of lines so I won't include all of the …
All 2 Replies
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.