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.

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!

-Adam

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.