Is there a way to separate a string cinfrom other strings following from cout?
Yes, but it's a little complicated: you need to turn off the echo for the console and type in the characters entered by the end user as you type.
When you find an incoming message, you need to do the following three steps:
:
Friend: How are you? <== This is your friend prior message
You: > I am fi <== This is the text you've entered so far
, , :
Friend: How are you? <== This is your friend prior message
Friend: Are you coming to school tomorrow? <== This is the new line that came in as the user was typing
You: > I am fi <== This is the text you've entered so far, re-printed again