我正在使用Microsoft Visual C++ 2008 我想加入一些字符串,然後在「system」命令中使用它。C++/CLI轉換系統::字符串轉換爲const char *
我試圖做這樣的:
System::String^ link;
link = "wget.exe --output-document=log http://ADDRESS";
link = link + System::String::Copy(textBox_login->Text);
link = link + "&passwd=";
link = link + System::String::Copy(textBox_passwd->Text);
system(link); //LINE WITH ERROR
,但我得到錯誤C2664: '系統':無法從 '系統:字符串^' 轉換參數1 '爲const char *'
我很感激任何幫助;)
可能重複的[如何將System :: String轉換爲const char \ *?](http://stackoverflow.com/questions/29335426/how-to-convert-systemstring-to-const-char ) – 2015-03-29 23:51:37