snguyen@nprdc.arpa (Son Nguyen) (12/20/88)
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 <stream.hpp> #include <ctype.h> #include <string.h> 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