in my opinion you should install a newer version of GCC you are not even using egcs which means it's oooolllddd.
second thing (this aplies to anyone doing C++ with GCC) is to install stlport instead standard gnu stl implementation, stlport can be found at
http://www.stlport.org