Can you help me with this? I will be very thankfull

In the previous assignments monthly average temperatures in Helsinki were computed. That can be done without storing the data in the memory since the data is already ordered by time. Looking for more complex information will require storing the data and possibly ordering it in some way before doing the computation.
Define a record structure (struct in C and C++) that can store one line of information from the file FIHELSIN.txt. The fields of one line are month, day, year and daily average temperature in Fahrenheit, in that order. Define a vector of elements of that structure and read all data in the file to that vector.
Order the data in the vector first by temperature and, if there are more than one day with the same temperature, also by year.

From your data find the year in which there was the largest number of days with the same average temperature.

Structure your program in a form of re-usable module. The module shall provide the interface (function declarations) in a header file and implementation in an independent C++ source code file. Name your module and the files suitably.

7 Years
Discussion Span
Last Post by Fbody
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.