Thread: Error :confused:

  1. #1
    Arggggh DeepFyre's Avatar
    Join Date
    Sep 2004
    Posts
    227

    Error :confused:

    I am getting this wierd error:
    invalid conversion from `char' to ` char*'


    Code:
    void Recieve(int nBytes, int clientSocket, char inMessage)
    {
        while (nBytes){
    	nBytes = recv(clientSocket, inMessage, sizeof(inMessage), 0);
    	}	
    }
    Keyboard Not Found! Press any key to continue. . .

  2. #2
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    look up what the second parameter for recv() is supposed to be. Suspect it's supposed to be a char* and you are trying to send it a char. Therefore, can't convert from char to char *.

  3. #3
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    The second parameter to recv() needs to be a pointer to a buffer that will hold the data received from the socket.

  4. #4
    Arggggh DeepFyre's Avatar
    Join Date
    Sep 2004
    Posts
    227
    Thanks!
    Keyboard Not Found! Press any key to continue. . .

Popular pages Recent additions subscribe to a feed