
作者 乔老师单位 湖南工程学院计算机与通信学院请将下面的代码补充完整使得程序运行结果符合预期。裁判测试程序样例#include iostream #include string.h using namespace std; class Student { public: int num; char *name; Student(int nu0, char *n); Student(Student s); ~Student(); void Show(); }; /* 请在这里填写答案 */ int main(){ int num; char name[30]; cinnumname; Student a(num,name); Student b(a); strcpy(b.name,罗翔); b.num 10002; b.Show(); a.Show(); return 0; }输入样例在这里给出一组输入。例如10001 张三输出样例在这里给出相应的输出。例如姓名罗翔 学号10002 姓名张三 学号10001参考示例Student::Student(int nu,char *n){ numnu; namenew char [strlen(n)1]; strcpy(name,n); } Student::Student(Student a){ numa.num; namenew char[strlen(a.name)1]; strcpy(name,a.name); } Student::~Student(){ delete []name; } void Student::Show(){ cout姓名name 学号numendl; }