.. or whatever
Im trying to create two filenames from what the user types in:
{
...
ofstream destination_blg;
ofstream destination_bal;
char filen[20];
cout << "Enter Filename:\t"
cin >> filen;
...
/*
Somehow a method to join filen and then ".blg" and ".bal" in herre.
To produce (filen = bob) bob.blg and bob.bal and give destination_blg = "bob.blg" etc
*/
...
ofstream.open(destination_blg);
ofstream.open(destination_bal);
...
}
I have tried using:
#define FFN(p, q) (p##q)
with:
destination_blg = FFN(filen, "blg");
destination_bal = FFN(filen, "bal");
but get the error "Unknown symbol filenbal", or "Expected ')'"
Someone who could help me please.
Thx.
-D3T