String as parameter of file.open()

Jul 17, 2015 at 1:07pm
My book says that file.open() only accepts C-string as parameter. However, when I try to use string as parameter, it works! I wonder if this is good to do or I should use the conventional way (C-string)?
Jul 17, 2015 at 1:21pm
The C++11 standard added support for using std::string as a parameter to the stream constructor, and open() function. So as long as you use the current standard you should be okay using the std::string.



Topic archived. No new replies allowed.