
-----------------------------------
Saad85
Sat Apr 05, 2008 1:25 am

newbie question about file streaming with variable filename.
-----------------------------------
okay, so to write something to a file is simple enough, but now i need to write many things to many files. the actual writing part i can deal with, but c++ gives me a compiler error when i try to open a file-out stream using a variable to hold the file name. 

my code is this:

#include
#include
#include
#include
#include

using namespace std;

string to_string( int val )
{
stringstream stream;
stream 