You can use '+' to do whatever you want in C++. See overloaded operator.
HelpCreate multiple files from a variable.
Oh ok, but it works just for the string var from #include <string>.
And still,the code itself,copy pasted (and with added includes cause why not) directly into dev c (changed to int main() ) doesn't work for me as the to_string command is causing issues it seems O.o
And yeah,i've made sure <string> is there /weeeeird
And yeah,i've made sure <string> is there /weeeeird
If anyone was still wondering,i managed to do it this way (however it doesn't spam it on the desktop,but on the actual folder)
It outputs file from spam0000 to spam9999,then proceeds from spamA000 to spamZ999.
huehue.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
ofstream prova;
int main()
{
string a,b="spam",c=".txt",d;
char u=48,i=48,o=48,p=48;
bool stop=false, first=true;
//48-57
int x,y=0,z;
cin>>x;
while(y<x)
{
a=u;
a+=i;
a+=o;
a+=p;
p++;
if(p>57)
{
p=48;
o++;
if(o>57)
{
o=48;
i++;
if(i>57)
{
i=48;
u++;
if(u>57)
{
if(first==true)
{
u=65;
first=false;
}
}
else if(u>90)
{
stop=true;
}
}
}
}
if(stop==false)
{
d=b+a+c;
prova.open(d.c_str(),ios::app);
prova << "lol.\n";
prova.close();
cout<<d<<endl;
y++;
}
else
{
break;
}
}
system("pause");
}
huehue.
Similar Threads
Generalis it safe to delete files from Temp folder found in Local settings?
13 Combat Arms Mod DiscussionList of .rez Files where we can copy Game Files from! 4 GeneralHelp! Virus scanner continuously deletes files from hacks!
17 Visual Basic Programminghow to create open files..like "Lunch"DO 10 CrossFire Hacks & CheatsCANT COPY DLL FILES FROM NEW WALLHACK!
27
