#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main() {
string I;
cout << "Decide the file name: ";
cin >> I;
ifstream inFile (I);
[other things...]
return 0;
}
here it says me:
error C2664: '__thiscall std::basic_ifstream<char,struct std::char_traits<char> >::std::basic_ifstream<char,struct std::char_traits<char> >(const char *,int)' : cannot c
onvert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'const char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called