#include<iostream.h>#include<string.h>class Node{char *p;public:Node(char *s){p=s;}Node(Node &t){int n=strlen(t.p);p=new char[n+1];strcpy(p,t.p);}void dele(){for(p;*p!='\0';p++){for(char *k=p+1;*k!='\0';k++){if(*p==*k){for(char *j=k;*j!='\0';j++){*j=*(j+1);}}k--;}}}void print(){cout<<"删除后的数组为";cout<<p<<endl;}};void main(){char s[]="abfwhfuwer";cout<<"原数组为"<<s;Node f1(s);f1.dele();Node f2(f1);f2.print();#include<iostream.h>#include<string.h>class Node{char *p;public:Node(char *s){p=s;}Node(Node &t){int n=strlen(t.p);p=new char[n+1];strcpy(p,t.p);}void dele(){for(p;*p!='\0';p++){for(char *k=p+1;*k!='\0';k++){if(*p==*k){for(char *j=k;*j!='\0';j++){*j=*(j+1);}}k--;}}}void print(){cout<<"删除后的数组为";cout<<p<<endl;}};void main(){char s[]="abfwhfuwer";cout<<"原数组为"<<s;Node f1(s);f1.dele();Node f2(f1);f2.print();}