Hi,
The program I'm making to teach myself C++ uses a user-specified file and then does the opening and read/write whatever stuff.
The error i get is this when trying to compile the read_file.open(in_file) line: "no matching function for call to 'std::basic_ifstream,char, std::char_traits> >::open(std::string&)'"
Please help
Thanks
#include <iostream>
#include <string>
using namespace std;
int main()
{
ifstream read_file;
ofstream write_file;
string in_file;
string out_file;
getline(cin, in_file, '\n');
getline(cin, out_file, '\n');
read_file.open(in_file);
***Above line causes the error***