Here is a common 'create directory' method:
void make_directory(const char* name)
{
#ifdef __linux__
mkdir(name, 777);
#else
_mkdir(name);
#endif
}
As for removing directories, you are on the right track, ie:
for the moment I delete each files one by one and then the folder with remove(...)