i am trying to read/write to/from two separate files, my code works as long as i execute it from the Visual C++ platform. when i double click on the exe file in the debug folder it doesn't write to the specified file. i think it has to do with the path names. my question is how to i define the path name completely? as in "H:\C2plus\monte_carlo\results.txt" ?
the portion of my code is as follows:
any help would be great!
using namespace std;
const char * filei="simMC1.txt";
const char * fileo="resultsMC.txt";
double X, TP, T, t1, z, r, So, Pavg, volatility;
int main ()
//read in file (call_put,N,TP,So,X,r,volatility)
ofstream outfile(fileo,ios: : out);
cout << "error";
outfile << Pavg << endl;