Hello fellows,
I’m new using FreeFeem, but I think the thing I’m trying to do is so simple.
The code is
exec("mkdir result");
exec("chdir result");
ofstream teste("teste.txt");
teste << "hello World!";
exec("cd ..");
For some reason, it is not working. My expectation of this code is
- Create the folder result
- Enter the folder result
- create teste.txt and write “hello World!” in it.
- Get back to the initial directory.
But, it create the “teste.txt” file inside original folder. I can’t understand why.
There is no compiling error. I don’t know.
I used “cd” instead of “chdir”, but no success either.
Please help. I guess is something very dumb, but I can’t figure what it is.
Thanks.