In my program when I ask the users to enter a username, target (fake) and message, it skips over the user's entry for the message when I use getline (cin, message); I reference the function writer the second line in my main program, just after system("color 0A"); encase that helps at all. Please help. I feel like the answer is just right in front of me but I can't see it!
Nevermind, I figured out my mistake. I used cin.ignore(); before getline (cin, message); It helped me but then I went to add another string and did the same but it didn't work so I removed the second cin.ignore() and everything worked flawlessly. Thanks for the feedback. Your suggested article sure did send me in the right direction.
The >> operator does not remove the end-of-line character that you enter when you press RETURN. So the following std::getline() reads it rather than moving to the next input. You need to skip over the end-of-line character. There are a few ways to do this. For example: