1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

memcpy() function Code

Discussion in 'C' started by alekya.ch, Sep 19, 2006.

  1. alekya.ch

    alekya.ch New Member

    Joined:
    Sep 15, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hi All,
    This is alekya. I am working as software Engineer. I want the code for memcpy() function. I know the prototype and purpose but I want user code of memcpy function().

    int memcpy(void *src, void *des, int size)
    {

    }
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    void * memcpy ( void * dest, const void * src, size_t num );

    Copy bytes to buffer from buffer.
    Copies num bytes from src buffer to memory location pointed by dest.

    Parameters.

    dest
    Destination buffer where data is copied.
    src
    Source buffer to copy from.
    num
    Number of bytes to copy.
    e.g.
    memcpy((void*)szData, pBuffer, iSizeBufNeeded);
    szData and pBuffer are pre allocated buffer where the memory copy operation is performed.
     

Share This Page