![]() |
#2
apull2021-02-09 00:43
|
代码如下:

#include<iostream>
#include<cstring>
using namespace std;
class Plorg{
private:
char plorg[19];
int CI;
public:
Plorg();
void aaa(char *p,int a);
void show();
};
Plorg::Plorg(){
char plorg[19]="Plorga";
}
void Plorg::show(){
cout<<"名称:"<<plorg<<endl;
cout<<"值:"<<CI<<endl;
}
int main(){
Plorg mm;
mm.show();
return 0;
}
#include<cstring>
using namespace std;
class Plorg{
private:
char plorg[19];
int CI;
public:
Plorg();
void aaa(char *p,int a);
void show();
};
Plorg::Plorg(){
char plorg[19]="Plorga";
}
void Plorg::show(){
cout<<"名称:"<<plorg<<endl;
cout<<"值:"<<CI<<endl;
}
int main(){
Plorg mm;
mm.show();
return 0;
}