SFML community forums

Help => Network => Topic started by: Mars_999 on April 09, 2012, 01:05:58 am

Title: sf::Packet and std::string space causes to break text up?
Post by: Mars_999 on April 09, 2012, 01:05:58 am
I am not sure why, but if I take input and send it as a packet with a space in the string, the packet only sends data up to the space and breaks off the rest of the string?

Any ideas?

Thanks!

SFML2.0 and VS2010
Title: Re: sf::Packet and std::string space causes to break text up?
Post by: Laurent on April 09, 2012, 10:19:11 am
It's not the packet, it's the >> operator on istream which stops at whitespace. Use std::getline to read a string until a custom delimiter.