![]() |
#2
rjsp2013-04-19 08:37
|

#ifndef people_h_
#define people_h_
#include <string>
using namespace std;
class people
{
private:
int age;
sring name; //报错,string标识符为定义
int no;
string identity_card;
string sex;
string add;
int birthday;
int phone;
public:
people(string a,int b,int c,string d,string e,string f,int g,int h);
~people(){};
};
#endif
不知道为什么,string name那报错 ,说string标识符为定义,后面几处都一点事都好的,注释了报错的那处后面几处也没报错。谢谢了 #define people_h_
#include <string>
using namespace std;
class people
{
private:
int age;
sring name; //报错,string标识符为定义
int no;
string identity_card;
string sex;
string add;
int birthday;
int phone;
public:
people(string a,int b,int c,string d,string e,string f,int g,int h);
~people(){};
};
#endif