saving a vector to a file

Hello everyone.I am new to this forum and also new at C++.I have the following difficulty and I hope you can help me.
I have a project to make a line editor,but as the title says,I can't figure out how to save the contents of the vector I am using in a txt file.Could you enlighten me a bit?
I'd appreciate it! :)
To write to files, you can use fstream:
http://www.cplusplus.com/reference/iostream/fstream/fstream/

Or ofstream if you don't need to read from the file:
http://www.cplusplus.com/reference/iostream/ofstream/
Topic archived. No new replies allowed.