ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/10/03:46:50

Newsgroups: comp.os.msdos.djgpp
From: fredex AT fcshome DOT stoneham DOT ma DOT us (Fred Smith)
Subject: Re: Doing wrong! But where?
Organization: None!
Message-ID: <Eo553p.o99@fcshome.stoneham.ma.us>
References: <34df149c DOT 11485161 AT news DOT hiway DOT fi>
Date: Tue, 10 Feb 1998 02:19:01 GMT
Lines: 36
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

JODE (joakim AT hiway DOT fi) wrote:

: **************************************************

: struct Man  {

: char stick[1];

try changing the line above to:
: char stick[2];

: }man1;

and

: fgets(man1.stick, 1, thefile1);

to

: fgets(man1.stick, sizeof (man1.stick), thefile1);

and what is this??????????:
: printf("%C\n", man1.stick);
          ^^ 

%C is not part of Standard C. Perhaps you meant %c ?? (or more likely,
with the other changes I propose %s is more appropriate).

Fred
--
-------------------------------------------------------------------------------
 .----    Fred Smith    /              
( /__  ,__.   __   __ /  __   : /     
 /    /  /   /__) /  /  /__) .+'           Home: fredex AT fcshome DOT stoneham DOT ma DOT us 
/    /  (__ (___ (__(_ (___ / :__                                 781-438-5471 
-------------------------------- Jude 1:24,25 ---------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019