المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : how to write output from a c++ program to a subdirectory of a directory where the .exe resides.



C++ Programming
05-11-2010, 03:34 AM
Hi

I would like to tidy up the directories. So I like to my program to read input from a sub-directory and write output to a sub-directory. All these two sub-directories are under the directory where the .exe resides.

FILE *f_ptr1;
CString ftitle;

f_ptr22[i] = fopen("rs_sf"+ftitle,"w");
fprintf (f_ptr2, "%.6lf\n",v[2*i]);


Thanks