Heim  >  Fragen und Antworten  >  Hauptteil

c++ - Der Quellcode, den ich im Internet gesehen habe, z. B. str == "#Connected#", ist in vielen Fällen mit ## umgeben. Bitte geben Sie mir einen Rat.

bool Chat::detectingInstruct(string str)
{

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;
}
世界只因有你世界只因有你2683 Tage vor636

Antworte allen(1)Ich werde antworten

  • 迷茫

    迷茫2017-05-19 10:49:46

    这。。。首先允许我确认一下这是不是C++/CLI模式?

    Antwort
    0
  • StornierenAntwort