[algogeeks] Re: GETS

2011-07-19 Thread SAMMM
You can try this :- fgets(buff,sizeof(buff),stdin) .. It is recomended not to use gets in g++ or gcc .. On Jul 19, 4:40 pm, Ankit Sablok ankitsablok19091...@gmail.com wrote: the gets function gives me error when i execute the following code plzz provide suggestions and answers char

[algogeeks] Re: GETS

2011-07-19 Thread Ankit Sablok
Y is it not recommended to use gets in g++ what is the exact reason can u tell On Jul 19, 4:47 pm, SAMMM somnath.nit...@gmail.com wrote: You can try this :- fgets(buff,sizeof(buff),stdin) .. It is recomended not to use gets in g++ or gcc .. On Jul 19, 4:40 pm, Ankit Sablok

[algogeeks] Re: GETS

2011-07-19 Thread SAMMM
It is because it doesn't check any bound checking . So overflow can easily occur without user's concent . On Jul 19, 4:48 pm, Ankit Sablok ankitsablok19091...@gmail.com wrote: Y is it not recommended to use gets in g++ what is the exact reason can u tell On Jul 19, 4:47 pm, SAMMM

Re: [algogeeks] Re: GETS

2011-07-19 Thread sagar pareek
+1 to SAMM On Tue, Jul 19, 2011 at 5:32 PM, SAMMM somnath.nit...@gmail.com wrote: It is because it doesn't check any bound checking . So overflow can easily occur without user's concent . On Jul 19, 4:48 pm, Ankit Sablok ankitsablok19091...@gmail.com wrote: Y is it not recommended to use