How do I create a new .txt file in a file directory I want, and allow a user to edit it?

OK, I have tried google, and the forums here, but none of it answered my question. I need to create a new .txt file, in a certain path on my computer, and then let a user enter text into it. How do I do this? Please attach code, and please remember that this is going in the middle of an existing project. I am using GCC 4.7.0 (I have C++ 11), and a good compiler.
Topic archived. No new replies allowed.