I use eclipse with minGW 32. I created a class:
Data(HWND hwnd, wchar_t szFileName[MAX_PATH])
{
std::vector<std::string> fileRows;
string sIn;
ifstream infile;
infile.open(szFileName);
infile.seekg(0,ios::beg);
// fill vector with file rows
while ( getline(infile,sIn ) )
{
fileRows.push_back(sIn);
}
}
but the ifstream
in MinGW could not resolve the wchar_t
.
How can I store the file lines int the fileRows
vector?
Absolutely sure that the file lines are string not wstring. So I should store the lines in a std::vector<std::string>