原文: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