#1. What compiler/IDE are you using (MSVC 6?), I see some old headers being used.

#2. Your code is not very C++ish. You use a mix of C and C++ I/O which should be avoided. You use character arrays when you should be using std::string objects instead. Your use of gets in particular is worrying.