On Sun, 2 Aug 1998, Torbjørn Kristoffersen wrote:
> I'm wondering if there is an easy way to make a C program that asks the
> user
> for his whole name, and stores the whole name in a string.
> If I use:
>
> "scanf("%s",name);"
>
> It'll only pick up the first word in his name.
>
> Maybe if I use getch() and store every letter in a string, even spaces,
> but there must
> be an easier way to do this..
>
> How can I store whole names taken from stdin, or f. ex. whole sentences?
Well I used gets() but now the gcc is telling me that function
is dangerous so it should be not used. But insted you can use fgets().
Uly