* xucaen@yahoo.com (xucaen@yahoo.com) [011109 18:13]:
why switch? how about:
> #include <fstream.h>
>
> int main()
> {
> char ch;
>
> while(!cin.eof() ){
> cin.get(ch);
if(ch != '\r') {
cout << ch;
}
> }
>
> return 0;
> }
(see also /usr/bin/tr for a more general and already-written solution)
good times,
--
Vineet http://www.anti-dmca.org
Unauthorized use of this .sig may constitute violation of US law.
echo Qba\'g gernq ba zr\! |tr 'a-zA-Z' 'n-za-mN-ZA-M'
Attachment:
pgpx8gCmg4kvi.pgp
Description: PGP signature