How do you write two strings to a file in c++
<pre><code>{
    string vertexcharacter = "{";
    string a = "}";



ofstream myfile;
myfile.open("newfile.txt");
myfile &lt;&lt; vertexcharacter, a;
myfile.close();

system("pause");
return 0;
</code></pre>

<p>}</p>

<p>the first string is written but the second string does not show up in a text document</p>
