33,311
社区成员
发帖
与我相关
我的任务
分享
class service
{
public:
service(char * str="");
bool install();
char name[64];
private:
int event;
};
int main()
{
service aa;
strcpy(aa.name,"xyz");
aa.install();
return 0;
}
service::service(char * str)
{
//...
}
bool service::install()
{
//...
return true;
}
#ifndef SERVICE_H_
#define SERVICE_H_
class service
{
public:
service(void);
service(char *);
service(const service &);
service & operator=(const service &);
service & operator=(const char *);
bool install();
char name[64];
~service(void);
};
#endif