www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/06/14:43:22

Message-ID: <370A2428.7555B650@accord-soft.com>
Date: Tue, 06 Apr 1999 20:41:36 +0530
From: Sunil V <sunilv AT accord-soft DOT com>
Organization: Accord Software & Systems Pvt. Ltd.
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: DJGPP problem
Reply-To: djgpp AT delorie DOT com

This is a multi-part message in MIME format.
--------------455ACECB8496062BA530BFFE
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,
This is w.r.t. that reading n lines problem.
Instead of using sscanf u can use a dummy **getchar** function just
after scanf to eat up the "\n"
which is taken as one line. code follows:

   scanf ("%d", &z);
   getchar();    /* dummy - to eat up unwanted end-of-line character */
   printf ("Text:\n");
   for (i=0;i<z;++i)
   {
      fflush(stdin);  /* i quess here's your problem */   /* not
necessary */
      gets(text[i]);
      l[i]=strlen(text[i]);
   }

Regards Sunil
--
_______________________________________________________________________

The only place where you get success before work is in your dictionary.
_______________________________________________________________________


--------------455ACECB8496062BA530BFFE
Content-Type: text/x-vcard; charset=us-ascii;
 name="sunilv.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Sunil V
Content-Disposition: attachment;
 filename="sunilv.vcf"

begin:vcard 
n:V;Sunil
tel;home:341 4609
tel;work:556 0136 / 138 / 105
x-mozilla-html:FALSE
org:Accord Software & Systems Pvt. Ltd.;Software Division
adr:;;;;;;
version:2.1
email;internet:sunilv AT accord-soft DOT com
x-mozilla-cpt:;-3328
fn:Sunil V
end:vcard

--------------455ACECB8496062BA530BFFE--

- Raw text -


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