ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/10/01:22:54

Message-ID: <34DFE624.39E4@post.comstar.ru>
Date: Tue, 10 Feb 1998 09:20:57 +0300
From: Dim Zegebart <zager AT post DOT comstar DOT ru>
Reply-To: zager AT post DOT comstar DOT ru
Organization: Comstar Ltd.
MIME-Version: 1.0
To: JODE <joakim AT hiway DOT fi>
CC: DJGPP Mail List <djgpp AT delorie DOT com>
Subject: Re: Doing wrong! But where?
References: <34df149c DOT 11485161 AT news DOT hiway DOT fi>

JODE wrote:
> 
> **************************************************
> 
> struct Man  {
> 
> char stick[1];
> 
> }man1;
> 
> fgets(man1.stick, 1, thefile1);
> 
> printf("%C\n", man1.stick);
> 
> *****************************************************
First, use %c (not capital 'C').
Second, use printf("%c\n", *(man1.stick)); or printf("%c\n",
man1.stick[0]);
And the last one, are you sure FILE *thefile1!=NULL ?

-- 
____ ____ 
|   \   /   Dim Zegebart
____/____   

Moscow Russia
WWW - http://www.geocities.com/siliconvalley/pines/7817
DZcomm - comm library for Allegro
Palantir - multytasking kernel for Allegro (based on PDMLWP)

- Raw text -


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