Looking for memcpy() and memcmp() routines in C
Michael Davidson
md at sco.COM
Wed Mar 1 08:17:40 AEST 1989
In article <20598 at tiger.oxy.edu> bagpiper at oxy.edu (Michael Paul Hunter) writes:
>If your compiler will pass structures you can create a routine like the
>one which follows to copy structures.
>
>struct foo CopyStruct(struct foo Thing)
>{
> return(Thing) ;
> }
If your compiler is capable of handling function arguments and
return values which are structures it almost certainly implements
structure assignment, so what you want is as simple as:
struct foo x;
struct foo y
x = y;
The only way to compare structures in a portable manner is to
compare corresponding members of the structures one by one.
More information about the Comp.lang.c
mailing list