Actually, I've tried this, gcc reports:
myfile.c:90: incompatible types in assignment
fread_word requires a pointer:
char *fread_word (FILE * fp)
Thanks though.
----- Original Message -----
From: "Alexander Speransky" <[EMAIL PROTECTED]>
To: "Jeremy Hill" <[EMAIL PROTECTED]>
Sent: Thursday, August 29, 2002 9:52 PM
Subject: Re: Question about leaking memory
> Hello Jeremy,
>
> Friday, August 30, 2002, 10:44:54 AM, you wrote:
>
> JH> void read (void)
> JH> {
> JH> char *tmp;
> JH> tmp = fread_word (fp);
> JH> strcpy (somestruct_data.best_ratio.name, tmp);
>
> By the way, I think that you can just doing this without any
> problem:
>
> somestruct_data.best_ratio.name = fread_word (fp);
>
> JH> return;
> JH> }
>
>
>
>
> --
> Best regards,
> Alexander mailto:[EMAIL PROTECTED]
>
>