Trying to read from file into an array. Don't understand what this error is, "no matching function for call to 'std::basic_ifstream<char>::open(std::__cxx11::string&)'
in_stream.open(sales_file);"
#include <iostream>
#include <fstream>
#include <string>
usingnamespace std;
int main()
{
int first, sales[20], i;
string sales_file;
ifstream in_stream;
cout << "What is the name of the file for the sales?\n";
cin >> sales_file;
in_stream.open(sales_file);
for(i = 0; i < 20; ++i)
{
sales_file >> sales[i]
}
in_stream.close();
}