TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mario Semo
from: James Mckenzie
date: 1998-10-19 18:02:28
subject: Need to copy

Hello Mario!

14 Oct 98 09:23, Mario Semo wrote to James Mckenzie:

 MS> i'm not sure what you mean.

 MS> struct stname{ .... } var1,var2;

 MS> and later you do:

 MS> memcpy(&var1,&var2,sizeof(var));
 MS> or?

This resulted in a SYS1808, which turns out to be an unresolvable error. 
When I switched to memmove, the values were not what they were supposed to
be.

 MS> why not simple do:

 MS> var2 = var1;

Believe it or not this works:

Void calc_offered_load (EXPT_DESC_PTR expt)
{
EXPT_DESC  ol_ex;

old_ex = ex;

where
memmove (&ol_ex , expt, sizeof(EXPT_DESC);

does not, as improper values result from some of the internal variables.

and memcpy (....);

results in a SYS1808 when called.

And I'm wondering why.

James

... If at first you don't succeed, you must be using 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™.