myFile.open (_fileName);
error: no matching function for call to `std::basic_ifstream<char, std::char_traits<char> >::open(std::string&)'
Sponsor Sponsor
TerranceN
Posted: Thu Apr 22, 2010 3:05 pm Post subject: RE:MinGW Problem
I can see in the error that _fileName is a string, and ifstream.open() does not accept strings. You need to convert it to a c-string (which is just an array of chars) using string's c_str() method (so use _fileName.c_str() instead of just _fileName). Hope that helps.
Euphoracle
Posted: Thu Apr 22, 2010 4:15 pm Post subject: RE:MinGW Problem
Didn't I already tell you this on irc...
BigBear
Posted: Thu Apr 22, 2010 4:23 pm Post subject: RE:MinGW Problem
Alright thanks that fixed it. I wonder why it worked at school...