how can i save a text file without typing ".txt" at the end?
<p>My Program (c++):</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;cstdlib&gt;
using namespace std;

float x, y, z;
char d[20];

int main()
{   
    cin.getline &gt;&gt;d;
    x=111;
    y=222;
    z=333;
    ofstream meuarquivo;
    meuarquivo.open (d".txt");
    meuarquivo &lt;&lt; x &lt;&lt; "\n";
    meuarquivo &lt;&lt; y &lt;&lt; "\n";
    meuarquivo &lt;&lt; z &lt;&lt; "\n";

    meuarquivo.close ();

    return 0;
}
</code></pre>

<p>I want to write something like "ThatsMyProgram", and I want the program to save this file as "ThatsMyProgram.txt".  How can I do that?</p>
