Header Error?

My error:
http://screensnapr.com/v/QNeyKH.png
My code:
http://screensnapr.com/v/Dk1Kef.png

Does anyone know what I may be doing wrong? I am not so good with headers.
The class declaration should not be in the .cpp files...all the class declaration must be in the.h including inline functions.

.cpp contains class definition...

So delete from line 9 to the end except line 4 and 8 in the end of the .cpp

And why don't you post the code here ? Images are just messed up.
You need to include "handIdentity.h" and <iostream> in the discard.h file.
Last edited on
@Peter87
Adding the #include <string> gives me:
http://screensnapr.com/v/gZfDOJ.png
@Ihtisham
Adding handIdentity.h and <iostream> in discard.h file give me:
http://screensnapr.com/v/S9P45c.png
why don't you try removing the "using namespace std;" and just add #include "handIdentity.h".
from the discard.h or .cpp or both?
It seems to have solved the problem by removing it from the .h file. What is namespace std used for because I am getting confused about when to use it and when not to.
its used when you use #include<iostream> it is used for 'cin','cout' and 'endl' etc and as in discard.h file you were not using any i/o stream so it shouldn't be there.
I was talking about "using namespace std".
Topic archived. No new replies allowed.