So basically I was making a chat app and then I came across to a bug i couldnt fix. for purpose of not leaking my source code here is an example of it:
#include<iostream>
using namespace std;
int main()
{
while (true) {
string lol;
cout << "you say >> ";
cin >> lol;
}
return 0;
}
so the bug is when you type a space in cin like you type: "hi lol" it prints "you say >>" twice and the more space you put the more "you say >>" repeats I really dont understand why this is happening. can soemone help me?