I want the user to input a file path, set it to a string and make an ifstream for the file.
the compiler is telling me --Code:string filepath; cout<<"Please enter a file path."<<endl; cin>>filepath; ifstream theFile(filepath);
13 C:\Users\Sterling\Desktop\C++ Practice\NumberAnalysis.cpp no matching function for call to `std::basic_ifstream<char, std::char_traits<char> >::basic_ifstream(std::string&)'
line 13 is ifstream theFile(filepath);
I'm kinda used to Java and just took a Java approach to it. Is there a way to do this using strings or something else?