If you put your lines of table data into a standard library vector or list, it's easy:

#include <vector>
#include <fstream>
#include <algorithm>
#include <string>
using namespace std;

vector<string> myTable; // array of strings for table

// fill myTable with strings here

ofstream outFile("MyFile.DAT"); // Open output file stream

// Copy myTable to outFile
copy(myTable.begin(), myTable.end(), ostream_iterator<string>(outFile));

if (!outFile.good())
{
// Handle errors here
}



Dave