how to save the file in the new created directer

hi, I have on code, but I don't know how to improve it. To make the result.txt in the newly created directer ?

The code are following :

using namespace std;

int main()

int n;
cout<<"paramater for p and N: ";

char folder[101];
cout<<"name your folder no fo: ";

char path[]="//Users//rw36//Desktop//new";

strcat(path, folder);

ofstream ou("result.txt" , ios::out);

for ( int i=0; i<10; i++)

return 0;
Hi ! Use code tags pls :)
U'r using a ton of includes when only 2 or 3 of them should be enough...

Change this: char path[]="//Users//rw36//Desktop//new";
to this: char path[]="C://Users//rw36//Desktop//new";

Topic archived. No new replies allowed.