为什么这个程序达不到目的?该如何修改?
#include<iostream>
using namespace std;
int main()
{
char *str="CDEFG";
char *next="FG";
for( ; *next!='\0';)
{
*str++=*next++;
}
*str='\0';
cout<<str<<endl;
}
[解决办法]
char *str="CDEFG";
char *next="FG";