I am new to programming and am having trouble with a school assignment. I need to make a class planner that prints out information after the user enters it and then askes for specific class numbers. The user enters the following information (in this order):
1. Name of Class
2. Class number
3. Meets on
4. Start time
5. End time
6. Teacher Name
7. Number of Students in Class
My problem is that the class has to be identified by the class number. I'd like to have the 'x' in the structured array be the class number or at least have the class information stored under the class number. Is this even possible? My code is as follows.
I greatly appreciate any help
cout<<"Class Name: ";
cin>>planner[x][0].ClassName;
cout<<endl;
cout<<"Class Number: ";
cin>>planner[x][1].ClassNum;
cout<<endl;
cout<<"Meets on: ";
cin>>planner[x][2].ClassMeet;
cout<<endl;
cout<<"Start Time: ";
cin>>planner[x][3].ClassStart;
cout<<endl;
cout<<"End Time: ";
cin>>planner[x][4].ClassEnd;
cout<<endl;
cout<<"Teacher Name: ";
cin>>planner[x][5].TeacherName;
cout<<endl;
cout<<"Number of Students in Class: ";
cin>>planner[x][6].StudentNum;
cout<<endl;