huangchongwen的专栏

#include<iostream>using namespace std;class student{ char *name; double chinese; double math;public:void showstudent (){cout<<"name"<<"."<<name<<endl;cout<<"chinese"<<"."<<chinese<<endl;cout<<"math"<<"."<<math<<endl;}void setstudent (char*p,double a,double b){name=new char[strlen(p)+1];strcpy(name,p);chinese=a;math=b;}};int main(){student stu1;stu1.setstudent("huangchongwen",80,90);stu1.showstudent();return 0;}

,一个真正的人对困难的回答是战斗,

huangchongwen的专栏

相关文章:

你感兴趣的文章:

标签云: