cout << "Type first name: ";
cin >> first_name;
cout << "Type last name: ";
cin >> last_name;
list1.insertLast(first_name, last_name);
cout << "Would you like to add another? Type y for yes or n for no: ";
cin >> another;
while (another == 'y')
{
cout << "Type first name: ";
cin >> first_name;
cout << "Type last name: ";
cin >> last_name;
list1.insertLast(first_name, last_name);
cout << "Would you like to add another? Type y for yes or n for no: ";
cin >> another;
}
list1.print();
cout << endl;
return 0;
}
I am trying to figure out how the linkedListType <string> list1; is coming up with an error. Also getting an error with the " Header.H"
We're not gonna be able to help with your header file error cuz..obvious reasons. *hint: it's not posted*
However, going by basic object types int, long, string, char, etc...(meaning no references, no pointers, no consts counting as object types) what is the type of linkedListType <string> list1;?
By the way, if this is a class assignment and you're allowed to use vectors, I'd use those instead of a string object.