I posted this on the Linuxprogramming, but I thought id post it here since its C++ as well.
Anyways, Im working on this little chat program and the other programs should be able to communicate with each other, the only problem is with my cin.getline, i use that to enter in text, but it blocks, so it waits for the user to enter something in and then itll receive, even if the other user sent it before hand. my code is posted at the site below. Is there a way to check if cin.getline is true or false, i used an if statement but it didnt help, apparently cin.getline return *this, instead of 1 or 0. But here's my code, hope someone can help. Thanks!