my code is.
and the error I got was |17|error: no matching function for call to`std::basic_ofstream<char, std::char_traits<char> >:: open(std::string&)'|Code:#include <iostream> #include <string> #include <fstream> using namespace std; int main(){ string text; string name; ofstream test; cout<<"Enter some text\n"; getline(cin, text); cout<<"enter the file name with the extension and path(ex. c:/users/jon/filename.txt)\n"; getline(cin, name); test.open(text); test<<text; test.close(); system("pause"); }



LinkBack URL
About LinkBacks


