Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!ukma!rutgers!ucsd!nprdc!snguyen From: snguyen@nprdc.arpa (Son Nguyen) Newsgroups: comp.lang.c++ Subject: Zortech C++, Version 1.6 Message-ID: <1194@arctic.nprdc.arpa> Date: 19 Dec 88 19:54:42 GMT Sender: news@nprdc.arpa Reply-To: snguyen@nprdc.arpa (Son Nguyen) Organization: Navy Personnel R&D Center, San Diego Lines: 47 I recently just purchased Zortech C++, V1.6, compiler. It seemed to run pretty good. However, I ran into a small problem when I tried to compile and run the following program: #include #include #include main () { int code; char str[80]; while (cin >> code) { case 1: . . . // Do something. . . . break; case 2: . . . // Do something. . . . break; case 3: // Quitting option. exit (0); default: break; } } The problem is that when I entered 'a' or any characters; the program halted and also my MS-DOS 3.3 got screw up. Therefore, I must reboot up my machine. I had tried the above model program on the UNIX 4.3BSD C++ compiler. It just ignored the invalid numbers or characters (That was what I meant when I first wrote this program) If you have the same problem as mine or if you know how to correct it, please let me know. Thanks. "A man must learn what he has to learn". E-mail to: snguyen@aegean.nprdc.mil