CString转char*
摘要:
1.传给未分配内存的const char* (LPCTSTR)指针.CString cstr = "asdd";const char* ch = (LPCTSTR)cstr;ch指向的地址和cstr相同。但由于使用const保证ch不会修改,所以安全.注意此种方法只能在non-UNICODE builds中使用。2.传给未分配内存的指针.CString cstr = "ASDDSD";char *ch = cstr.GetBuffer(cstr1.GetLength() + 1);cstr.ReleaseBuffer();修改ch指向的值等于修改cstr 阅读全文
posted @ 2013-04-11 22:33 云化雨 阅读(922) 评论(0) 推荐(0) 编辑