タダで使えるBorland C++ Part4
■ このスレッドは過去ログ倉庫に格納されています
0022デフォルトの名無しさん
NGNGコンパイルエラーになるんですが、どこかおかしいんですかね。
#include <vector>
#include <fstream>
#include <string>
bool read_lines(std::ifstream& ifs, std::vector<std::string>* str_array)
{
std::string s;
while (std::getline(ifs, s)) {
str_array->push_back(s);
}
return str_array->size() > 0;
}
int main()
{
return 0;
}
エラー E2285 test.cpp 9:
'_STL::getline<_CharT,_Traits,_Alloc>(_STL::ifstream,_STL::string)' に一致するものが見つからない
(関数 read_lines(_STL::ifstream &,_STL::vector<_STL::string,_STL::allocator<_STL::string> > *) )
■ このスレッドは過去ログ倉庫に格納されています