Structure hopping
Alex Martelli
staff at cadlab.sublink.ORG
Fri Jan 4 22:43:41 AEST 1991
mark at tfsg.UUCP (Mark Crafts) writes:
...
:Forgive my ignorance, but is there a quick 'n' simple way to say,
:dump a structure to a file (or whatever) using pointers, if we
:know that the structure only consists of, (for example) chars?
fwrite((char*)pointer, sizeof(*pointer), 1, stdout), or similar, should
do in many such cases ("holes" between members may be slight nuisances).
--
Alex Martelli - CAD.LAB s.p.a., v. Stalingrado 53, Bologna, Italia
Email: (work:) staff at cadlab.sublink.org, (home:) alex at am.sublink.org
Phone: (work:) ++39 (51) 371099, (home:) ++39 (51) 250434;
Fax: ++39 (51) 366964 (work only), Fidonet: 332/401.3 (home only).
More information about the Comp.lang.c
mailing list