Hello anonim,
PLEASE ALWAYS USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post.
http://www.cplusplus.com/articles/jEywvCM9/
http://www.cplusplus.com/articles/z13hAqkS/
Hint: You can edit your post, highlight your code and press the <> formatting button.
You can use the preview button at the bottom to see how it looks.
First "#include <iostream>" should not be in the or any header file.
".cpp" files should start with the "#include" statements.
Try to avoid using
using namespace std;
in your programs it may seem easy now, but
WILL get you in trouble some day.
It is better to learn to qualify what is in the standard name space "std::" and then to learn what is in the "std::" name space now while it is easy.
In your "#define", "const" or a "constexpr" it is better to use capital letters to let you know it has a constant value and can not be changed.
I like to define the ifstream near where it is use, in the beginning of main or the function it is used in. This way you do not have input or output streams hanging around where they are not needed. Although there is nothing wrong with what you have done it is just a suggestion.
Hope that helps,
Andy