- Home /
 
              This question was 
             closed Dec 17, 2014 at 09:11 PM by 
             unimechanic for the following reason: 
             
 
            Question is off-topic or not relevant
 
               Question by 
               wolfnetteam · Dec 16, 2014 at 10:17 PM · 
                ubuntu  
              
 
              [Ubuntu] masterverver.h make error
OS: ubuntu 14.04.1 LTS 64bit Error:
 MasterServer.cpp:28:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
  char* logfile = "masterserver.log";
                  ^
 MasterServer.cpp: In function ‘void RemoveTable(std::string)’:
 MasterServer.cpp:53:6: error: ‘databaseServer’ was not declared in this scope
   if (databaseServer.RemoveTable(const_cast<char*>(table.c_str())))
       ^
 MasterServer.cpp: In function ‘int main(int, char**)’:
 MasterServer.cpp:173:6: error: ‘databaseServer’ was not declared in this scope
       databaseServer.SetStatDelay(statDelay);
       ^
 MasterServer.cpp:202:14: error: ‘daemon’ was not declared in this scope
    daemon(1, 0);
               ^
 MasterServer.cpp:214:28: error: ‘databaseServer’ was not declared in this scope
   masterPeer->AttachPlugin(&databaseServer);
                             ^
 make: *** [MasterServer] Error 1
 
 
               I tried with "this->" ...
 MasterServer.cpp: In function ‘void RemoveTable(std::string)’:
 MasterServer.cpp:53:6: error: invalid use of ‘this’ in non-member function
   if (this->databaseServer.RemoveTable(const_cast<char*>(table.c_str())))
       ^
 
 
               MasterServer.cpp line 53:
 void RemoveTable(std::string table)
 {
     if (table == "") return;
     if (databaseServer.RemoveTable(const_cast<char*>(table.c_str())))
         Log::print_log("Success\n");
     else
         Log::print_log("Table %s not found\n", table.c_str());
 }
 
               Please help me! :)
Thanks
Mark
               Comment