TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mads Orbesen Troest
from: James Mckenzie
date: 1998-10-09 05:39:22
subject: Need to copy

Hello Mads!

08 Oct 98 07:59, Mads Orbesen Troest wrote to James Mckenzie:

 MT> Why, Hello James...

 MT> Replying to a message of James Mckenzie to All:

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

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

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

The program is written in c, but I want to move it to C++ over time.  Can
you give an example of what you are talking about?

James

... I don't do Windows
--- GoldED/2 2.50+
* Origin: OS/2 Support * Your place for OS/2 information and Files (1:309/63)
SEEN-BY: 396/1 632/0 371 633/210 260 267 270 371 635/506 728 639/252 670/218
@PATH: 309/63 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™.