C++字符串赋值strcpy函数的使用

	char *pStr = new char[20];
	char *pSource = "ganquanfu";
	strcpy(pStr,pSource);
	cout << pStr <<endl;


/*string name = "ganquanfu";
 
const char *names = name.c_str()
;
 cout<<names<<endl;
*/
posted @ 2013-06-05 19:43  Predator  阅读(565)  评论(0编辑  收藏  举报