2010年8月6日
摘要: C/C++ codestring 是c++标准库里面其中一个,封装了对字符串的操作 把string转换为char* 有3中方法: 1。data 如: string str="abc"; char *p=str.data(); 2.c_str 如:string str="gdfd"; char *p=str.c_str(); 3 copy 比如 string str="hello"; char p[... 阅读全文
posted @ 2010-08-06 06:36 陈孝勇 阅读(300) 评论(0) 推荐(0) 编辑