Opening a textfile with user supplied filename
I am writing a simple text file manipulation program and am getting the following errors from gcc:
file converter.cpp: In function ‘int main()’:
file converter.cpp:32: error: no matching function for call to ‘std::basic_ifstream<char, std::char_traits<char> >::basic_ifstream(std::string*)’
line 32 in my program is:
ifstream inf(startdate);
where startdate is a string class.
file converter.cpp:39: error: no matching function for call to ‘std::basic_ofstream<char, std::char_traits<char> >::basic_ofstream(std::string&, const std::_Ios_Openmode&)’
line 39 in my program is:
ofstream outf(asxcode, ios::app);
Where asxcode is a string class.
If passing a string is illegal how do I use a user supplied filename?
Thanks,
BeerGut