Ok. In my linked list class I am making an istream operator so a user can just cin >> aList;
Here is what I have so far
1 2 3 4 5 6 7 8 9 10 11 12
istream& operator >> (istream& is, List& aList)
{
int num;
cout << "Current elements on List: " << aList.get_count() << endl;
cout << "Enter a number to add to list: ";
is >> num;
aList.Add_To_Back(num);
.
.
.
.
.
my issue is i know i will need a while loop that will check for some input. But how am i supposed to know when they are done?? I want to give them an option say press "something" to stop entering numbers. The problem is that they can enter any number so it cant be a number. it needs to be something like press escape to stop entering numbers, but i dont know what that while statement would looklike.