|
From: Juliano P. B. C. <jp...@bo...> - 2003-04-04 01:46:30
|
Hello to everybody. I know this isn't a pure c/c++ programming list (=
it
s more a c++ plus dev-c++ programming list, right?) but maybe some of you
could help me with this:=0D
1-Why does gcc for unix tell me "gets" is a dangerous function?=0D
2-What exactly is the difference between the <ENTER> key stroke of unix a=
nd
of windows? I often have problems with it when I read two consecutive val=
ues
for example:=0D
for(i=3D0;i<5;i++)=0D
scanf("%c",&a);=0D
In the example above, I've tried to use "fflush(stdin), but it seemed=
to
have no effect. The one thing that worked fine was something like:=0D
for(i=3D0;i<5;i++)=0D
{=0D
scanf("%c",&a);=0D
getchar(); //strange getchar(). Would it be to read some extra
character of the Unix <ENTER>?=0D
}=0D
I hope my second doubt isn't too confusing.=0D
=0D
Thanks to all.=0D
Juliano=0D
=0D
***********************=0D
Visite tamb=E9m meu site: =0D
http://www.jpavel.kit.net =0D
=20
|