c++ - Les codes sources que j'ai vus sur Internet, tels que str == "#Connected#", sont entourés de ##. Qu'est-ce que cela signifie, veuillez me donner quelques conseils.
bool Chat::detectingInstruct(string str)
{
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <code> if (str == "#Connected#" )
{
if (isServer && RecSocket != NULL)
{
if (AllName.size() == 0)
{
RecSocket->SendData( "#NoID#" );
}
string newName = SetName();
NameInRoom.push_back(newName);
ShowName();
Room->Send( "#ClearNameInRoom##end#" );
for (vector<string>::iterator itr = NameInRoom.begin();
itr != NameInRoom. end ();itr++)
Room->Send( "#ShowName#" + *itr + "#end#" );
RecSocket->SendData( "#GetName#" + newName + "#end#" );
}
return true;
}</code>
|
世界只因有你2832 Il y a quelques jours735