Hello all. I've read all the fstream tutorials, and none of the code works in devc++ 4.9.9.2.
For example here is a function I'm working on. The code I have to convert a string to char works. It's the fstream stuff that throws off a "no matching function for call to `std::basic_ifstream<char, std::char_traits<char> >::get(char*&)" error.
I'm a bit rusty on c++, so it's probably something simple.
fstreams can be used exactly like C++ streams like cin and cout. cin.get() works on a single char argument, not a char*. So the error is giving you the exact problem - there is no method in ifstream (or cin) called get() that accepts a char*. Maybe gets would do what you want, but that's C-style. Try plister >> ch, or getline(plister, ch). And why are you using character arrays? This is C++; that's what std::string is for.