話がずれるかもしれないが便乗。
STLには名前空間 stdがついていますか、
std::stringみたいに、いちいち指定していますか?

using namespace std; で済ましているのはダメ?