原文:error: no matching function for call to 'std::basic_ifstream ::open(std::string&)

string filename .txt ifstream fin fin.open filename 上述語句會產生如下錯誤: error: no matching function for call to std::basic ifstream lt char gt ::open std::string amp 原因是C 的string類無法作為open的參數。 解決方案:使用C的字符串。 ...

2012-12-15 23:23 0 3153 推薦指數:

查看詳情

 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM