![]() |
Creating a Directory and read/write to file in Directory in C++
I will explain how to create a directory in linux using a c++ program.
The program to create a directory is as follows: Code: Cpp
The function mkdir() will create the directory. To know about mkdir() function do man 2 mkdir in the command window. To use the function mkdir u have to include these header files i.e <sys/stat.h> <sys/types.h> Now i will show the program which will create the directory and then creates a file in the directory and performs read/write operations. The Program is as follows: Code: Cpp
|
Re: Creating a Directory and read/write to file in Directory in c++
good info
|
Re: Creating a Directory and read/write to file in Directory in c++
good one
|
Re: Creating a Directory and read/write to file in Directory in c++
|
Re: Creating a Directory and read/write to file in Directory in c++
nice
|
Re: Creating a Directory and read/write to file in Directory in c++
Well I have a problem guys...and I would like to know if you can help....is for Borland C/C++ not for linux, but I guess it is the same....
I`m in one directory EX: C://prog/test/ and there is a file "nr.in" How can I copy that file in to C://prog/ ? Thanks for your help guys. |
Re: Creating a Directory and read/write to file in Directory in c++
Quote:
U can copy some file from C://prog/ to C://prog/test/. |
Re: Creating a Directory and read/write to file in Directory in c++
i tried your code good one
|
Re: Creating a Directory and read/write to file in Directory in c++
tried nice code
|
Re: Creating a Directory and read/write to file in Directory in c++
|
| All times are GMT +5.5. The time now is 03:03. |