Create multiple files from a variable.
I'm "working" on a program that can output one or more files on the desktop,with possibly different extensions,starting from a variable.
This means an user can choose to create X number of files on the desktop.
ATM the code looks like this:
Anyone knows what i should put in the comment line?
This means an user can choose to create X number of files on the desktop.
ATM the code looks like this:
Code:
using namespace std;
int main()
{
int x,y,n=1;
cin>>x;
for(y=0;y<=x;y++)
{
//create file named as n on the desktop (first cycle it'd be 1.txt,second 2.txt etc etc)
n++;
}
system("pause");
return 0;
}

