#include <cstdlib>
#include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char *argv[])
{
string f, o, i, file_c, file_d;
ifstream fin;
ofstream fout;
f = "in.txt";
o = "out.txt";
cout << "Input filename" << endl;
cin >> i;
file_c = i + f;
file_d = i + o;
cout << file_c << endl;
cout << file_d << endl;
fin.open(file_c);
fin.close();
system("PAUSE");
return EXIT_SUCCESS;
}
The problem im having is getting the file to open.