I'm having trouble with where to begin with an assignment. I'm hoping someone here will have a little more knowledge and be able to explain it to me. Just a point in the right direction please!! Here's the assignment:
Create a Class that reads a file completely into a
C-style string in memory. Try to do this with one call
to the iostream read routine.
Make sure your class frees up its resources in the destructor.
HINT: Use the ios::binary option when you open the file.
Your basic class should look something like:
class FileString
{
public:
// If File errors exist place them into the string buffer
// which starts with **ERR:
// For example, **ERR: Couldn't open file
FileString (string filename);
// A call to value returns the contents of the file.
const char * value();
};