I have a nested map with all self-defined objects as key and values
typedef map <Time,WindLogType> minuteIntervalData;
typedef map <Date,minuteIntervalData> DayData;
How can I access the the data in the inner map by using the operator [] when the inner key is unknown?
Eg.
DayData[date1] //gets time1,time2,time3..... and WindLogType
[]operator), you must know its key. You can still use the map, like for example iterate over it, but it's not possible to get a single element of it.Date) to the outer map? From that you get a map of typeminuteIntervalData. From that you want to get all entries in that map? (If so, why mention the outer map at all? Just start with a singleminuteIntervalDataobject.)Date) i have several dates 1/01/2020,2/01/2020 from the dates i want to access the inner map which contains time stamps of the day eg. 9:30,9:40. From there i want to access a Date and get all the timestamps according to the Date keydaysof typeDayData, the expressiondays [date1]evaluates to an object of typeminuteIntervalData. Done deal. For the next step, abstract away that expression and start with an object of typeminuteIntervalData. Once you have such an object, it does not matter how you obtained it. You can remove all mention ofDayDatafrom your question, if I understand what you are trying to ask.