cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/01/22:13:48

Date: Sat, 1 Nov 1997 22:09:34 +0500 (GMT)
From: Guillermo Porras <guporras AT calvin DOT univalle DOT edu DOT co>
To: john kismul <john DOT kismul AT bergen DOT mail DOT telia DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Beginners Question
In-Reply-To: <3458C5E6.47D7@bergen.mail.telia.com>
Message-ID: <Pine.GSO.3.96.971101220544.11045A-100000@calvin.univalle.edu.co>
MIME-Version: 1.0

On Thu, 30 Oct 1997, john kismul wrote:

> I've allocated some memory with malloc.
> 
> How do I transfer data from this memory to somewhere else in memory,
> such as, someother memory I've allocated or an array.

I think it is memcpy () .

    #include <string.h>
     
     void *memcpy(void *dest, const void *src, int num);

Description
-----------

This function copies NUM bytes from SOURCE to DEST.

Return Value
------------

DEST

Example
-------

     memcpy(buffer, temp_buffer, BUF_MAX);

> 
> 

                    
                                    
                           ,     .|.
                          <@7   --O--    
                          cc'    '|`     
                          /Y)       
                          |/            
                    ______!\ ___-_-_-                                                                       


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019