reading a line through scanf



I want to read a line with white spaces though scanf.
So i used:
scanf("%['/n']",string);

above is working in one program, but in other..what may be the reason?

.



Relevant Pages

  • Re: reading a line through scanf
    ... gyan wrote: ... > I want to read a line with white spaces though scanf. ... Prev by Date: ...
    (comp.lang.c)
  • Re: Question about void pointers
    ... never found a reason to use it with scanf. ... I suppose (although printf() and scanf() are by no means mirror ... itself in a single string, we avoid any problems with funny formats. ...
    (comp.lang.c)
  • Re: HPGCC related ...
    ... I hate it when it gets there as well and for that reason I have never ... conversation two months ago or so discussing scanf or the keyboard ... On the calculator, you already have plenty of tools for getting input ... built into the OS - primarily the stack. ...
    (comp.sys.hp48)
  • Re: scanf to include white spaces
    ... > I was wondering if there was a way to include the white spaces in a string. ... variable must be an array pointer. ... scanf() stops at white space. ...
    (comp.lang.c)
  • Re: reading a line through scanf
    ... pete wrote: ... > gyan wrote: ... >> I want to read a line with white spaces though scanf. ...
    (comp.lang.c)