这个怎么运行崩溃!!!
#include<iostream>using namespace std;
void strcopy(char *p1,char *p2);
void main()
{
char p1[]={"Tomato Studio"};
char *p2;
int size=sizeof(p1)/sizeof(int);
cout<<"p1内容为:"<<p1;
p2=new char[size];
strcopy(p1,p2);
cout<<"p2内容为:"<<p2<<endl;
delete [] p2;
}
void strcopy(char *p1,char *p2)
{
for(char *temp=p1;*temp!='\0';temp++)
{
*p2=*temp;
p2++;
}
}