about fstream.open()

when I use fstream.open("filename") to creat a file
if there is directory in the filename
such as out/example.txt
if there is no folder '/out/' in the same directory of the program
the open() will fail
so how to add a folder in the present directory?
thanks
Directory operations are different from files. The operations vary between systems.

What operating System and compiler are you using?
linux
I'm wondering if there any shortcut statement or function argument in fstream could achieve this goal
thanks
int mkdir(const char* path, mode_t mode);

No, you cannot create a directory using the stream library.
thanks!
Topic archived. No new replies allowed.