Write string to end of file (c + +)

I have a program already formed that has a string that I want to stream to the end of an existing text file. All of what little I have is this: (C++)

 void main()
{
   std::string str = "I am here";
   fileOUT << str;
}

I realize there is much to be added to this and I do apologize if it seems I am asking people to code for me, but I am completely lost because I have never done this type of programming before.

I have attempted different methods that I have come across the internet, but this is the closest thing that works and is somewhat familiar.

This question and all comments follow the "Attribution Required."

All Answers

Answers Loading...
Leave a Reply
You must be logged in to post a answer.
About the author
ked