create multiple text files inside a loop
<p>I want to create some text file in C++. For example: I will run a loop from 1 to 5 and create the following files:</p>

<pre><code>1.txt
2.txt
3.txt
4.txt
5.txt
</code></pre>

<p>is it possible? I have made a sample code:</p>

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

main()
{
   FILE *fp;
    int i;
    for(i=1;i&lt;=5;i++)
    {
        //fp=fopen("%d.txt","r",i); //what will go here??

 }
}
</code></pre>

<p>I am confused about what I will write inside the loop. how can I create those files? </p>