What error do you get than? And you're sure your including
using namespace std also? Also make sure the include paths of your compiler are right.