bug med reference på typecast

This commit is contained in:
Sam Mario Svensson 2013-11-22 09:49:48 +01:00
parent c5e432b566
commit 9e6593abd1
1 changed files with 2 additions and 10 deletions

View File

@ -29,7 +29,7 @@ int main()
Client client;
//Connect to server
client.Connect(9876, "127.0.0.1");
client.Connect(9876, "10.0.0.3");
chat(client);
@ -79,20 +79,12 @@ void chat(Client client)
case package_type_header:
break;
case package_type_test:
cout <<"Client 2: " <<((ProtocolTest*)&header)->textMessage <<endl;
cout <<"Client 2: " <<((ProtocolTest*)header)->textMessage <<endl;
break;
}
std::getline(std::cin, msgSend);
std::cin.clear();
if(msgSend.length() < 1)
{
//memcpy(msgSend, " " , 1);
msgSend = " ";
//strcpy_s((char)msgSend , " ");
}
if( msgSend != "exit")
{