well, about creating files, you're wrong..
Code:
// example to demonstrate it
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ofstream out("filethatdoesntexist.txt");
out << "howdy" << endl;
return 0;
}
Creating directories is a bit more complex, id say you better check out:
There is no OS independant way to do it.. /: