Hey! I got my C++ first Client/Server project almost done. It's a project that connects to the server and then if you write "Hello" the Server would reply with "World". It doesn't seem to work though. I got to the point where the client can write a message and server would say "Recieved the following message from the Client: " and it would print out the message after that.
My next and final step would be: if that message is Hello, then print out World back to Client. I have no idea how to do this though and I've tried for nearly 1,5 hour. This is how the server code is right now:
It doesn't seem to work though :/Code:{ recv(sConnect, Message, sizeof(Message), NULL); strmessage = Message; cout << "Received the following message from the Client " << Message << endl; getchar(); if(Message == "Hello"){ answer = send(sConnect, "World",6,NULL); } } while(Message != "Exit");