July 3rd, 2005, 12:10 AM
#1
how to create directory in c++
i just want to know how to create folders using c++ code...i can make files usng iostream,but can folder?
i
July 3rd, 2005, 01:33 AM
#2
Re: how to create directory in c++
July 3rd, 2005, 06:42 AM
#3
Re: how to create directory in c++
Originally Posted by
golanshahar
::CreateDirectory
This would only work in Windows...
July 3rd, 2005, 06:45 AM
#4
Re: how to create directory in c++
There is not platform-independent way of doing it...thus, you need to check what the C run-time or API of the correpsonding operating system has to offer...which one are you using?
July 3rd, 2005, 10:43 AM
#5
Re: how to create directory in c++
Originally Posted by
Andreas Masur
This would only work in Windows... ;)
i think that people working in unix/linux wouldnt ask that question ("folders":)
Last edited by l00p1n6; July 3rd, 2005 at 10:44 AM .
Reason: disabled smilies
July 3rd, 2005, 11:42 AM
#6
Re: how to create directory in c++
thanks guys for replaying..
by the way i m using linux not windows...why would not linux users not ask that?!
i use mandrake 10.
July 3rd, 2005, 12:22 PM
#7
Re: how to create directory in c++
Originally Posted by
l00p1n6
i think that people working in unix/linux wouldnt ask that question ("folders"
Why? Aren't there folders in Linux?
July 3rd, 2005, 12:24 PM
#8
Re: how to create directory in c++
Originally Posted by
deepinlife
thanks guys for replaying..
by the way i m using linux not windows...why would not linux users not ask that?!
i use mandrake 10.
AFAIK, there should be a 'mkdir' function...
July 3rd, 2005, 02:18 PM
#9
Re: how to create directory in c++
There is relatively portable boost method create_directory .
"Programs must be written for people to read, and only incidentally for machines to execute."
July 3rd, 2005, 02:22 PM
#10
Re: how to create directory in c++
Originally Posted by
Andreas Masur
Why? Aren't there folders in Linux?
no respectable *nix programmer would call them "folders". They are directories.
July 3rd, 2005, 04:55 PM
#11
Re: how to create directory in c++
Originally Posted by
stober
no respectable *nix programmer would call them "folders". They are directories.
Well...I guess that I does not have that much respect for my *nix then (IOW, my directories can be folders if they want)...
November 11th, 2005, 03:25 PM
#12
Re: how to create directory in c++ - on Linux
Originally Posted by
golanshahar
::CreateDirectory
Cheers
Is ::CreateDirectory a Windows specific function? How to create directory using C++ on Linux?
Are there any C++ functions available (that create directory on Linux) written by someone who would like to share to others?
o/w; Is there a built-in C++ function that creates directory and will runs on Linux (no Windows specific stuff?
Thanks!
Windy
November 11th, 2005, 05:48 PM
#13
Re: how to create directory in c++
Originally Posted by
RoboTact
RoboTact has already given the answer. Use boost::filesystem and you'll have the bonus of having OS independent code.
Get
this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
Supports C++ and VB out of the box, but can be configured for other languages.
November 11th, 2005, 09:00 PM
#14
Re: how to create directory in c++
Andres also posted a function that is portable between *nix and MS-Windows -- mkdir().
June 11th, 2008, 05:32 PM
#15
Re: how to create directory in c++
i had to create directories in windows using VC++
I can get CreateDirectory to work only when the path is like " c:/face"
If I give "c:/face/images" it doesnt create the folder, not even face, any help would be appreciated.
if I have c:/face created then it creates ./image also :?
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width
Bookmarks