Redefinition?
<p>I'm trying to make a little game that occurs in a hospital. Here's the code:</p>

<p>first the header:</p>

<pre><code>#ifndef Hospital_Patient_h
#define Hospital_Patient_h

class Patient
{
public:
    Patient();
    bool cured();
    bool died();
    bool treatable();
    void treat();
    void untreated();
    char consonant();
    char vowel();
    std::string getName();


    int age;
    int health;
    std::string name;

    bool operator==(const Patient &amp;other)const;


};
#endif
</code></pre>

<p>and here's the cpp:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;
#include "Patient.h"
using namespace std;

char CONSONANTS[] = 
{'b','c','d','f','g','h','j','k','l','m','n','p','r','s','t','v','z', '\0'};
char VOWELS[] = 
{'a','e','i','o','u', '\0'};
//generates a patient with initial health, a name, and an age from 10-79
Patient::Patient()
{
    int a= rand() % 80 + 10;
    health= 50;
    name= getName();
    age= a;
}

bool Patient::cured() {
    return health &gt;= 100;
}

bool Patient::died() {
    return health &lt;= 0;
}
//treatable if not dead and not cured
bool Patient::treatable() {  
    return !died() &amp;&amp; !cured();
}

void Patient::treat() {
    if(treatable()) health= min(health + 10, 100);
}

void Patient::untreated() {
    if(treatable()) health= max(health - 1, 0);
}   

char Patient::consonant() 
{
    int index = rand() % 17; //CONSONANTS.size();
    return CONSONANTS[index];//rand.nextInt(CONSONANTS.length)];
}

char Patient::vowel() 
{
    int index = rand() % 5; //VOWELS.size();
    return VOWELS[index];//rand.nextInt(VOWELS.length)];
}

//generate a random name
string Patient::getName(){
    string s;
    s+=toupper(consonant());
    s+= vowel();
    s+=consonant();
    s+=vowel();
    if (rand() % 3 == 0) {
        s+=consonant();
    }
    if (rand() % 3 == 0) {
        s+=consonant();
        s+=vowel();
    }
    s+=(' ');
    s+=toupper(consonant());
    s+=vowel();
    if (rand() % 3 == 0) {
        s+=consonant();
    }
    s+=consonant();
    s+=vowel();
    if (rand() % 3 == 0) {
        s+=consonant();
    }
    if (rand() % 3 == 0) {
        s+=consonant();
        s+=vowel();
    }
    return s;
}
//overload ==
bool Patient::operator==(const Patient &amp;other)const{
    //compare each room's room number field
    return (this-&gt;age == other.age &amp;&amp; this-&gt;name == other.name);
}
</code></pre>

<p>so far after each of the functions I get an error saying Redefinition of 'function name'</p>

<p>I'm also having issues with the constructor and assigning values to the variables defined in the header.  The header also isn't liking std:: for some reason and I know I should never have using namespace in the header.   </p>
