Hello all.

I have a problem with a socket server program I writing. The server manages to set up the socket just fine, however, it now needs to be able to take in input from a client.

I using the following command to receive information and print it out on the client side so that I can check that it's working:

bytes_recieved = recv(connected,recv_data,1024,0);

And when I compile, I get the following warning:

server.c: In function `main':
server.c:93: warning: passing arg 1 of `printf' makes pointer from integer without a cast

What needs to happen with this is that once I get the receive working (I realize now that I spelled 'receive' wrong in my program :p) I need to be able to parse through the input and count the number of consonants, vowels, and other characters.

Help is greatly appreciated as I am really new to this.

9 Years
Discussion Span
Last Post by AdamMagana

printf takes a formatting string as its first parameter. You probably meant:

printf( "%d\n", bytes_received );

Thanks for the help. I ended up figuring that out in the mean time!

All of the code works now!


This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.