0

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);
printf(bytes_recieved);

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.

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by AdamMagana
0

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

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

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

All of the code works now!

-Adam

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.