Write your question here.
for this project im having a hard time on which mistakes im doing for the loops and break statements too for this project.
#include <iostream>
#include <vector>
#include <iomanip>
#include <string>
using namespace std;
int main()
{
vector<string> names;
vector<double> grades;
int numStudents;
int sum = 0.0
cout << "Welcome to the Student roster" << endl;
double average = 0.0;
double grade = 0.0;
string fullName;
string firstName;
string lastName;
char selection;
cout << "Welcome to the student roster! " ;
cout << "How many students are in your class?: " ;
cin >> numStudents;
//Read in Student Info
for (int i = 0; i < numStudents; ++i){
cout << "Please enter student (First Last Grade) info: ";
cin >> firstName >> lastName >> grade;
fullName = firstName + " " + lastName;
names.push_back(fullName);
grades.push_back(grade);
}
bool loop=true
//Print Menu and Thanks
cout << "Thank you for entering your students information! " << endl;
cout << "Please choose one of the following options:" << endl
<< "a: add a Student" << endl
<< "r: remove a Student" << endl
<< "p: print the class summary" << endl
<< "m: print menu" << endl
<< "q: quit program" << endl;
//Read in Initial Selection
while(selection!='q')
{
Try to compile the code. Look at the errors produced by the compiler. Start with the first one, fix it, recompile and repeat.
If it still doesn't work as expected, or you have trouble fixing some of the compilation errors, then we can discuss it, but right now there are just too many obvious syntactical errors that I would just be repeating what the compiler is saying if I tried to help you.
thank you, so sorry i also meant to do the brackects when i was posting this, because that is not the original style work to how i did it to be very honest. But i did see the errors which that i had forgetten my semicolons. I am a new programmer and i also overthink things alot. and thank you again.