expression must have integral or enum type

03/16/2014 16:24 szymek111#1
PHP Code:
void info(SOCKET *accettastd::string idint client) {

    
    
std::string info EncryptGamePacket("req_info" "1" id);
    for (
int i 0<= utentii++)  send(accetta[i], info.c_str(), info.size(),0);
    


Someone know why i get error : expression must have integral or enum type ?

Here : "1"
03/16/2014 16:36 Padmak#2
You cannot add two char*, wrap "req_info" or "1" in a new std::string

Padmak
03/16/2014 16:44 szymek111#3
Then what i can do ? xd
03/16/2014 16:50 snow#4
Quote:
wrap "req_info" or "1" in a new std::string
Padmak gave you the answer.
Code:
std::string("req_info") + std::string("1") + id
You could write "req_info1" as well, I don't see the point in concatenating 2 constant strings..
03/16/2014 16:59 szymek111#5
Quote:
Originally Posted by snow911 View Post
Padmak gave you the answer.
Code:
std::string("req_info") + std::string("1") + id
You could write "req_info1" as well, I don't see the point in concatenating 2 constant strings..
Ok . Mod can now close this thread . Thanks for help.
03/16/2014 19:58 MrSm!th#6
#closed