Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   newbie here (http://www.go4expert.com/forums/newbie-here-t7752/)

m_kk 8Dec2007 01:40

newbie here

I am completey new to c++ and programming too. Couls come one explain me what does this statement do

sprintf(buffer, "%s %s/- %s %s\r\n", url, client_ip, clientName, method);

url,client_ip, clientName and method are variables.

shabbir 8Dec2007 10:09

Re: newbie here
The statement populates the buffer with the values of url, client_ip, clientName, method in the format specified in the quotes.

m_kk 9Dec2007 03:59

Re: newbie here
Thank you. does it mean they will be stored in the format url client_ip-clientName method?. also i know \n is new line what does \r specify?

All times are GMT +5.5. The time now is 19:47.