TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: James Mckenzie
from: Mads Orbesen Troest
date: 1998-10-08 07:59:18
subject: Need to copy

Why, Hello James...

Replying to a message of James Mckenzie to All:

 JM> I received a program which uses memcpy to copy from one variable to
 JM> another which are built on the same structure.  Other than doing the
 JM> copy the hard way, what function can I use?

memcpy is available in both mem.h and string.h 

If you don't want to use the memcpy solution, and if you're programming
C++, you can create a copy-constructor for the structures instead; this
allows you to specifically define what should happen when an instance is
copied.

   These were the incoherent ramblings of ...
      ... Mads Orbesen Troest 

--- FleetStreet 1.21+
* Origin: Which was the mooste fre, as thynketh yow? (2:238/202.1)
SEEN-BY: 396/1 632/0 371 633/210 260 267 270 371 635/506 728 639/252 670/218
@PATH: 238/202 444 5 9 236/203 270/101 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.