HOW TO SAVE A DATA TO FILE?

what are the codes that will save the data then it will appear in a file (.txt).

I typed the name "SpongeBob SquarePants"

Name: SpongeBob SquarePants


then It will appear in a file.
 
SpongeBob SquarePants


help me for the codes.
Last edited on
Did you try a search engine yet? (Google, this website's)
I did already.

Last edited on
If you want to be rude I'm not going to help.
that was wrong comment.
.
Rigghttt.

If you did look it up on the forums, you'd find a page on fstream.

http://www.cplusplus.com/reference/fstream/fstream/?kw=fstream

Come on now, you're just being lazy.
Last edited on
Topic archived. No new replies allowed.