Witam, potrzebuje przerobić kod napisany w Qt na c++ tylko nie wiem jak się do tego zabrać

 
    QByteArray array;
    char zero = 0;
    char six = 6;
    char _255 = 255;
    array.append(six);
    array.append(zero);
    array.append(_255);
    array.append(_255);
    array.append("info");
    socket->write(array);

próbuje takie coś ale nie wiem czy idę dobra drogą:

    char zero = 0;
    char six = 6;
    char _255 = 255;

    char string[5];

    string[0] = six;
    string[1] = zero;
    string[2] = _255;
    string[3] = _255;
    string[4] = *"info"; 

    if(send(socket_desc , string , sizeof(string) , 0) < 0)
    {
        printf("Send failed");
        return 1;
    }
    printf("Data Send\n");

    //Receive a reply from the server
    if( recv(socket_desc, server_reply , 2000 , 0) < 0)
    {
        printf("recv failed");
    }
    printf("Reply received\n");

printuje "Data Send" i tyle - recv nie daje błędu ani pozytywu.