So this is the client.cpp file. So what\'s the problem? I declare this string \'G\', I enter the nickname and then here \' cout << G << \":\" << sbuff
The string G you declare in the global scope at the top is over shadowed by the string G that you declare in the main scope and thus the one you read into isn't available to the ClientThread method. Delete the declaration in the main scope.
string G
main
ClientThread