我遇到問題。我需要將字符串類型轉換爲unicode。 我知道metod像在C++中將std :: string轉換爲Unicode字符串
string.c_str();
但它不起作用在我的代碼。
我有功能
void modify(string infstring, string* poststring)
,並在其中我需要顯示備忘錄infstring。像
Form1->Memo1->Lines->Add("some text "+infstring.c_str()+" some text");
但是編譯器說我「E2085無效指針除了」
我怎樣才能解決我的問題?
現在它說「不能將字符串轉換爲Unicode字符串」。我認爲,那ss.str()返回字符串類型,但我需要在unicode字符串。有任何想法嗎? – user2090826 2013-02-20 11:09:00
你是什麼意思「Unicode字符串」?這不是C++類型,你的意思是什麼類型? – 2013-02-20 11:19:13