#include
using namespace std;
void main()
{
char* m="kjhh";
char* p=“adsd”;
char buf[10]={0};
strcpy(buf,p);
p=new char(strlen(m)+1);
strcpy(p,m);
cout<<buf<<endl;
cout<<p<<endl;
delete [] p;
system("pause");
}
p = new char [strlen(m)+1]
用中括號