cplusplus

VC中LPCTSTR和char*

上一篇 / 下一篇  2011-09-10 10:36:08 / 个人分类:VC

CString str = "string";
void test1(char *p1)
{

}

void test2(LPCTSTR p2)
{

}

test1(str);//错误
test2(str);//正确

CString 类重载了LPCTSTR

TAG: CString

 

评分:0

我来说两句

Open Toolbar