Yes
August 17th, 2007, 10:58 PM
Is it possible to open a file like this?
void openFile (string fileName)
{
fstream myfile;
myfile.open (fileName);
}
Because that's what I have now, and I keep getting a compilation error, "no matching function call for call to 'std::basic_fstream<char, std::char_traits<char> >::'open(std::string&)'".
Thanks.
void openFile (string fileName)
{
fstream myfile;
myfile.open (fileName);
}
Because that's what I have now, and I keep getting a compilation error, "no matching function call for call to 'std::basic_fstream<char, std::char_traits<char> >::'open(std::string&)'".
Thanks.