1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

newbie here

Discussion in 'C' started by m_kk, Dec 7, 2007.

  1. m_kk

    m_kk New Member

    Joined:
    Dec 7, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    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.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    The statement populates the buffer with the values of url, client_ip, clientName, method in the format specified in the quotes.
     
  3. m_kk

    m_kk New Member

    Joined:
    Dec 7, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    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?
     

Share This Page