I've used cin.get() in a function, which is called several times during a full program run. After the first run of this function cin.get() is discarded somehow.
But after that, the user will have to press a key, and I don't want that.
Well, if you don't want the user to press a key then delete the cin.get() lines -- that's what that function is used for.
>>cin.get() is discarded somehow.
Probably because a previous cin operation was for an integer, which leaves the '\n' in the keyboard buffer, and the next cin.get() will remove that '\n' from the keyboard buffer and toss it away.
cout << "Enter a number\n";
cin >> num;
cin.ignore(); // flush the '\n' from keyboard buffer