Can someone tell me why I get this error
"terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check
Abort trap"
when i run the following code? user and reservations are vectors of two classes
else if (str == "lookup")
{
getline(cin, Name, '\n');
if (Name == user.at(i).getName())
{
for (int i = 0; i < user.size() ; i++)
{
cout << user.at(i).getName();
cout << user.at(i).getphone();
cout << reservations.at(i).getflight();
cout << user.at(i).getdate();
}
}