Re: reading a line through scanf
- From: "Suman" <skarpio@xxxxxxxxx>
- Date: 29 Jun 2005 23:23:28 -0700
gyan wrote:
> I want to read a line with white spaces though scanf.
> So i used:
> scanf("%['/n']",string);
^
Should you not use '\n' instead?And should you not exclude the newline
when trying to read a newline? I feel [^\n] might just be more
appropriate.
> above is working in one program, but in other..what may be the reason?
.
- References:
- reading a line through scanf
- From: gyan
- reading a line through scanf
- Prev by Date: reading a line through scanf
- Next by Date: Re: how to let gcc warn me when I use = in conditions
- Previous by thread: reading a line through scanf
- Next by thread: Re: reading a line through scanf
- Index(es):
Relevant Pages
|