#include <iostream>
#include <fstream>
#include <string>
int main()
{
std::string filename = "testfile";
std::ifstream fin;
fin.open(filename.c_str()); // Works just fine.
fin.close();
//fin.open(filename); // Error: no such method.
//fin.close();
}
Pełny tekst tutaj:
http://stackoverflow.com/questions/32332/why-dont-the-stdfstream-classes-take-a-stdstring
Brak komentarzy:
Prześlij komentarz