开发学院软件开发C++ String类的一些赋值语句 阅读

String类的一些赋值语句

 2008-03-08 12:39:18 来源:WEB开发网   
核心提示:AnsiString -> char AnsiString.c_str(); char -> AnsiString AnsiString=AnsiString(char); BSTR -> char* char* char1=AnsiString(bstr).c_str(); wchar_t ->

  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;

Tags:String 一些 赋值

编辑录入:爽爽 [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接