if you only want "abc" without enter (\n), you may use
gets(&buff[0]);
instead of
fgets(&buff[0] , Length ,stdin);
--Editing--
And be carefull when using gets().
If someone enters 500 characters, your program above, will -mostly- crash.
(gets() doesn't check buffer overflow. fgets() is safer).
Last edited by kodyazan : 09-06-2008 at 05:53 PM.
|