I have included <string> and am trying to write out to a file but am getting some strange error messages.
my code:
f.write(current->text);
what should I change, or use?
I have included <string> and am trying to write out to a file but am getting some strange error messages.
my code:
f.write(current->text);
what should I change, or use?
A string has a member function, c_str(), which returns a char *. Try that.
Thanks.
I'll give it a go shortly, I'm just presently adding code to add an animal to my animal game. (a uni assignment)
Mike