|
From: Nathan B. <na...@ps...> - 2002-11-30 20:10:53
|
When writing a basic program to perform a calcuation I have set types as =
float to receive input (cin). When I enter a character (not a number) =
when prompted for input the program terminates. This happens even when =
using exception handling
cin.exceptions(cin.failbit);
try{ }
catch (...) { };
I've enabled exception handling via compiler options but this does not =
help? Can anyone offer any comments on how to avoid program termination =
when type mismatch occurs?
Thanks, Nate |