On Thu, Jul 11, 2002 at 11:25:49PM -0500, Jeremy Hill wrote:
> Howdy once again.
> 
> Structure:
> struct  {
> ...
>    struct
>    {
>       char name[MAX_INPUT_LENGTH];
>    } best_ratio;
> ...
> } bfield_data;
> 
> 
> When reading from a file, this isn't working:
> bfield_data.best_ratio.name = fread_string (fp);
> 
> (bfio.c:192: incompatible types in assignment)
> 
> How can I get around this?  I'm trying to steer away from using pointers on 
> the
> structure itself as I am inexperienced with them.  Any ideas?

use strcpy() here. Keep in mind that you should throw away the
return pointer afterwards anyway.

Edwin
-- 
Edwin Groothuis      |           Personal website: http://www.MavEtJu.org
[EMAIL PROTECTED]    |        Interested in MUDs? Visit Fatal Dimensions:
bash$ :(){ :|:&};:   |                    http://www.FatalDimensions.org/

Reply via email to