请帮我看一下这个简单的程序
leus 2002-03-30 02:40:06 #include "stdafx.h"
#include <string>
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
char* p =new char;
string t="hello world\n";
strcpy(p,t.c_str());
cout<<p<<endl;
delete p;//此行出错,运行是错误
return 0;
}
编译通过,运行报错。