高手帮看看C++一个程序 哪错了...
#include <iostream>using namespace std;
class string
{
private:
char *str;
int len;
public:
void showstr()
{cout<<"string:"<<str<<",length:"<<len<<endl;}
string()
{len=0;
str=null;}
string(char *p)
{len=strlen(p);
str=new char[len+1];
strcpy(str,p);
}
~string()
{
if(str!=null)
{delete [] str;
str=null;
cout<<"析构函数被调用"<<endl;
}
}
void main(void)
{
char s[]="ABCDE";
string s1(s);
string s2("123456");
s1.showstr();
s2.showstr();}
运行的时候出现这个错误 fatal error C1004: unexpected end of file found