Hi guys,
This is a cpp file which used to execute the function in the class' header file.
When I try to compile this code I get this problems:
1)error C2143: syntax error : missing ';' before 'using'
2) error C2059: syntax error : ')'
3)error C2143: syntax error : missing ';' before '{'
There are more errors, but all of them are like those I've mentioned.
Seems to me that the problem lies in your "Person.h", since that is the only place the error could be. (IMO ;) ) Why not post it here, and that can be checked out?
#include <iostream>
#include <string>
usingnamespace std;
class Person{
private:
int age;
string _pname;
string _last_name;
public:
Person(); //default C'tor
Person(string _pname_, string _last_name_, int _age); //non-defualt C'tor
Person *next, *back; //pointers to the next and the back object in the list
}
I have some input kind of unrelated, but I was researching and learned that starting names with underscores is a dangerous route because those names are typically reserved for implementation and system entities. You may encounter clashes in the future.