If you want to write cross-platform code, you can use boost::filesystem
routines
#include <boost/filesystem.hpp> boost::filesystem::create_directory("dirname");
This does add a library dependency but chances are you are going to use other filesystem routines as well and boost::filesystem
has some great interfaces for that.
If you only need to make a new directory and if you are only going to use VS 2008, you can use _mkdir()
as others have noted.
Related Posts:
- Why do we need virtual functions in C++?
- How do I fix a “Expected Primary-expression before ‘)’ token” error?
- What are the rules of the std::cin object in C++?
- C++ code file extension? What is the difference between .cc and .cpp
- C++ Error: ISO C++ Forbids Comparison Between Pointer and Integer [-fpermissive]
- segmentation fault 11 in C++ on Mac
- How to append text to a text file in C++?
- In C++, what is wx.h?
- Using “super” in C++
- new types may not be defined in a return type – C++
- declaring a priority_queue in c++ with a custom comparator
- C++ undefined reference to WinMain@16 (Code::Blocks)
- bit vectors in c++
- Very basic inheritance: error: expected class-name before ‘{’ token
- Error: “expected primary-expression before int”
- Operator Overloading C++; too many parameters for << operation
- Unexpected end of file error
- How do I check if a Key is pressed on C++
- Regular cast vs. static_cast vs. dynamic_cast
- What is an unsigned char?
- What is a Memory Heap?
- 403 Forbidden vs 401 Unauthorized HTTP responses
- Advanced AREL or just Rails Query for has_many through search by association
- C++ std::priority_queue uses the lambda expression
- When to use reinterpret_cast?
- “If not” condition statement in python
- Expression must be a modifiable lvalue
- How to read a file line by line or a whole text file at once?
- How can I sort a dictionary by key?
- how does the ampersand(&) sign work in c++?
- What does purpose use #ifdef and #if in C++
- How to solve munmap_chunk(): invalid pointer error in C++
- “X does not name a type” error in C++
- TranslateName() function doesn’t work on win10
- Time Complexity of Prims Algorithm?
- How to use the PI constant in C++
- How to concatenate two strings in C++?
- C++ terminate called without an active exception
- MinGW: “gcc is not recognized as an internal or external command”
- Convert Python program to C/C++ code?
- What’s the difference between & and && in MATLAB?
- azure error 502 – Web server received an invalid response while acting as a gateway or proxy server
- How to debug ‘Stack smashing detected’?
- What is a Ray ID (Cloudflare)?
- basic_string::_M_construct null not valid after constructing subvector of strings
- warning: control reaches end of non-void function [-Wreturn-type]
- How to fix “Root element is missing.” when doing a Visual Studio (VS) Build?
- Program received signal SIGSEGV, Segmentation fault
- Alternative to ui-grid(doesn’t support angular2/4)
- gcc/g++: “No such file or directory”
- Tool for drawing parse trees?
- Error: expected type-specifier before ‘ClassName’
- Is dependency injection useful in C++
- What does “Permission denied” “Id returned 1 exit status” mean?
- When does an Incomplete Type error occur in C++
- std::cin input with spaces?
- R dates “origin” must be supplied
- extended initializer lists only available with
- Is Python faster and lighter than C++?
- Mongoose.js: remove collection or DB
- Case insensitive string comparison C++
- slideToggle JQuery right to left
- Valgrind Invalid free() / delete / delete[] / realloc() in C
- C++ Exception thrown: read access violation. this was nullptr
- Exception in thread “main” java.lang.reflect.InvocationTargetException
- C++ getInt() function (have a java equivalent attached)
- Simple string parsing with C++
- member access within null pointer of type ‘struct ListNode’
- Python: What OS am I running on?
- ER-Diagram: Ternary Relationship – How to read properly?
- How can I diff 2 files while ignoring leading white space
- creating dynamic array of string c++
- Converting time stamps in excel to dates
- The name ‘InitializeComponent’ does not exist in the current context
- How well is Unicode supported in C++11?
- The CXX compiler identification is unknown
- How to determine the version of the C++ standard used by the compiler?
- Java: Not a statement
- Make / gcc cryptic error 2: how to have more information?
- Passing a hexadecimal value into a module in Verilog
- REGSVR32: the module “xxxxx.dll” failed to load … dependent assembly could not be found
- Error: expression cannot be used as a function?
- What is a .h.gch file?
- MinGW .exe requires a few gcc dll’s regardless of the code?
- How can I trash multiple posts at once from the front end?
- Customized Essay Writing Service
- What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats?
- How to set environment variable in systemd service?
- Symlink not updating as expected when using an absolute with relative path
- How to include multiple domains in an spf TXT Record
- Physically locating the server
- Good tools that fit on a thumb drive [closed]
- How do you answer yes for yum install automatically
- All servers flooded by salt water, is it possible to recover data from multi-platter drives?
- How to check if I’m in screen session?
- How to zip/unzip files in Powershell?
- Cooling Server Closet – No A/C Is Possible
- Is it better practice to buy RAID disks individually vs. in bulk?
- What range of MAC addresses can I safely use for my virtual machines?
- What sysadmin things should every programmer know?