![]() |
#2
crystall2012-12-11 09:47
|
#include<string.h>
#include<iostream.h>
void main()
{
char buffer[10];
strcpy(buffer,"ABC");
cout<<buffer<<endl;
char *ps;
ps="hello";
cout<<ps<<endl;
strcpy(ps,buffer);
cout<<buffer<<endl;
}
运行的时候弹对话框,
指针的位置问题重叠?