I have this class, It contains a set of variables that represent the temperatures of countries
WeatherDataTime(std::string timestamp, float AT, float BE, float BG, ... )
I used it to create a vector that contains a group of these objects
std::vector<Candlestick>
I want to create a function that returns the temperature values for a country, by passing the country code to the function, but since the variable that I will use, “countryCode,” is not part of the class elements, I cannot request it normally. How can I overcome this problem?
std::vector<Candlestick> getCandlestickForYear (std::vector<WeatherDataTime>& dates, std::string countryCode) { dates[0].countryCode; }
I haven’t found a solution yet