#include
#include
#include
using namespace std;
int main()
{
string str;
char temp;
cout<<"输入字符串,按回车键结束输入"<
{
str +=temp;
}
const int LEN =str.length();
char* dest = new char[LEN];//根据输入字符串的长度,创建字符数组
for(int i = 0;i
dest[i]=str[i];
cout<
delete dest;
system("pause");
return 0;
}