void Course::addCourse()
{
string a;
int b;
int total;
int courseAdd;
cout<<"How many course you want to add?"<<endl;
cin>>courseAdd;
cout<<"Enter the name of course and number of hours"<<endl;
for(int i=0;i<courseAdd;++i)
{
setCourseName(a);
setHours(b);
getCourseList().insert({a, b});
total += getHours();
matchMap.insert({make_pair(a,b),make_pair(day,dayHours)});
}
How many course you want to add?
1
Enter the name of course and number of hours
Enter the course name
Coursenam1
Enter the course hours
4
You added the courses succesfully!
Coursenam
> How to reach array's elements from map?
let's go back a little, you are asking for a (horrible) implementation detail.
go to the big picture, ¿what do you want to do?
I don't understand why your map holds an array when it seems that you only want one day.