
-----------------------------------
UWO
Fri Oct 28, 2005 8:35 am

Generating 128 files with different names in one program.
-----------------------------------
Hi all,

I need to generate 128 different files. I have a C program that i have designed that generates one file at a time. I have one option that i compile my program 128 times and while compiling i give different names or i could write a small C program or a script that would deal with the situation. The problem i get when i want the file to have 128 different names. The file saves strings only while saving the file, it does not read integers as i tried to save the file with in an integer loop. What step should i take in order to save the file with different names.

Regaards,

UWO.

-----------------------------------
Tony
Fri Oct 28, 2005 8:56 am


-----------------------------------
you could use the ASCII equivelent of the integer. Just make sure you stay in the alphabetic boundary :wink:

-----------------------------------
Mazer
Fri Oct 28, 2005 3:54 pm


-----------------------------------
Why not convert an integer to a string?

-----------------------------------
MysticVegeta
Mon Oct 31, 2005 6:35 pm


-----------------------------------
what is the command to do that?

-----------------------------------
wtd
Mon Oct 31, 2005 7:31 pm


-----------------------------------
#include 
#include 
#include 

int main()
{
   int number(42);
   std::string output;
   std::stringstream ss;

   ss > output;

   std::cout 