#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
struct staffTWB {
string staffName;
int staffProf;
};
void printEntry(staffTWB);
int main() {
string staffName;
int staffProf;
while (staffName != "done") {
cout << "Please enter a staff name(done to leave the program):" << endl;
getline(cin, staffName, '\n');
if (staffName == "done") {
break;
}
else {
cout << "Please enter the profession of " << staffName << "\n";
cin >> staffProf;
cin.ignore();
if (staffProf >= 1 && staffProf <= 4) {
**printEntry(staffTWB);**
}
else {
cout << "Wrong entry!\n";
cin.clear();
cin.sync();
}
}
}
The line with the astrix is where the error is occurring from