Amiga-C (170/223)

From:Jack York
Date:23 Aug 2001 at 05:53:21
Subject:[amiga-c] Saving and reading structs

Hello,

I have a declaration of something like
struct mystruct
{
struct Node nn_Node;
BOOL a;
LONG b;
STRPTR c;
struct List *d;
}mystruct;

I allocate STRPTR c as needed so its strlen will vary with each instance
of mystruct. I wanted to be able to save the struct to disk with
fwite(&mystruct, sizeof(struct mystruct)...
but that won't work because of the varying length. Any suggestions on
what's the best way to save this?

Jack



E-Mail: jyork@twmi.rr.com
Alt: jyork@voyager,net
Home: http://my.voyager.net/~jyork

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Do you need to encrypt all your online transactions? Secure corporate intranets? Authenticate your Web sites? Whatever
security your site needs, you'll find the perfect solution here!
http://us.click.yahoo.com/Bre3tC/Q56CAA/yigFAA/dpFolB/TM
---------------------------------------------------------------------~->

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/