The following code
u_int32 *data_out
data_out = malloc(4 * sizeof(uint32_t));
//connection_fd is a socket
n = write(connection_fd, data_out[0], strlen(data_out[0]));
produces the following error:
Array.c:261: warning: passing argument 1 of ‘strlen’ makes pointer from integer without a cast
/usr/include/string.h:399: note: expected ‘const char *’ but argument is of type ‘uint32_t’
I tried the following as well, but still a warning is the result:
n = write(connection_fd, (char) data_out[0], strlen((char) data_out[0]));
n = write(connection_fd, (char*) data_out[0], strlen((char*) data_out[0]));
Thanks for any insights :),
Patrick
Why you are using strlen to write int?
Maybe use: