I am writing a basic code but run into an error when trying to open a file. I've had a rough break and am having to start from the basics. Following is the part of the code where I run into the error:
int main()
{
string name;
fstream file;
cout << " Enter file name and type (E.g filname.txt) : ";
cin >> name;
file.open(name);
Following is the error:
[Error] no matching function for call to 'std::basic_fstream<char>::open(std::string&)'
I am returning after a long break so I apologize for any inconsistencies.