当前位置导航:炫浪网>>网络学院>>编程开发>>C++教程>>C++进阶与实例

String类的一些赋值语句

ansistring -> char ansistring.c_str();
char -> ansistring ansistring=ansistring(char);
bstr -> char* char* char1=ansistring(bstr).c_str();
wchar_t -> ansistring ansistring(wchar_t)
ansistring -> wchart ansistirng.widechar();
char -> widestring char *s=\"adsfdsf\";
wchar *p=widetring(s).bstr();
widestring -> char wchar_t *p=l\"sdsfdfsf\";
char *s=ansistring(p).c_str();
char * c -> wchar_t * cc ansistring con = c;
cc = con.widechar( cc , con.widecharbufsize );
wchar_t * c -> char * cc ansistring con = c;
cc = con.c_str();
widestring -> wchar_t widestring a = l\"abc\";
wchar_t *b = new wchar_t[4];
wcscpy(b, a); ansistring=ansistring(b);

widestring wsnote ;
// wsnote = ........
ansistring snote = wsnote;
上一篇:匈牙利命名法 下一篇:TCollection
相关内容
赞助商链接