64,639
社区成员
发帖
与我相关
我的任务
分享
#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
char * txt=new char[64];
strcpy_s(txt,63,"ABCDEFG");
cout<<txt<<endl;
delete [] txt;
txt="123456789";
cout<<txt<<endl;
cin.get();
return 0;
}
#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
char * txt=new char[64];
txt="123456789";
cout<<txt<<endl;
strcpy_s(txt,63,"ABCDEFG");
cout<<txt<<endl;
delete [] txt;
cin.get();
return 0;
}