Mail Archives: djgpp/1999/04/06/14:43:22
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 -