Lines 10 and 17. You define nCelsius as an integer, then you read it in as integer. If it's NOT an integer, the >> operation fails. Since you can't ASSUME it's an integer (that's the whole reason you're checking), you can't read it in as an integer. Read it in as a string, THEN check to see whether it's an integer.
Reputation Points: 2614
Solved Threads: 687
Posting Expert
Offline 5,371 posts
since Jan 2008