for clear screen
Assuming u are working in linux/unix this shud works
system("clear");
in windows make that system("cls"); //I do this in 32 bit windows Console programming
I don't know much about namespace std stuff, have heard of it myself, but never used g++ really.
What else?