declaring string error

hey guys I've taken quite the hiatus from Programming anyway I'm getting back into and was going over composition but before I even got to that I'm getting a strange error that I just don't know where I'm going wrong


I'm getting an error when declaring a string as a constructor I have never got tis before so I'm not sure what's going on can anyone spot any errors as to why this may not be working

also I used a member intialisation list but that didn't solve the problem.

people.h

1
2
3
4
5
6
7
8
9
10
11
12
13
 #ifndef PEOPLE_H
#define PEOPLE_H


class people
{
    public:
        people(string n);

    private:
};

#endif // PEOPLE_H 




people.cpp

1
2
3
4
5
6
7
8
9
10
11
12
13
14

 #include "people.h"
#include "birthday.h"
#include <iostream>
#include <string>

using namespace std;

people::people(string n)
{
    
}






thanks
Last edited on
In the header file #include <string> , and qualify string as std::string
Topic archived. No new replies allowed.