To KingZoolerius66:
Did it not give you any errors when compiling it? You definitely need that one line; it fixes all errors (believe me, i tried it just now).
For your information, you could replace that one line with these ones:
using std::ofstream;
using std::cin;
using std::ios;
If you don't get what I'm talking about, you need some series review on it. Every C++ beginner know about this.