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:
If you don't get what I'm talking about, you need some series review on it. Every C++ beginner know about this.