answersLogoWhite

0

Is it a file or a folder you want to create? Use open/creat/fopen for the former, mkdir for the latter.

Example:

FILE *f;

int rc;

rc= mkdir ("C:\\AA");

if (rc) perror ("Error in mkdir");

f= fopen ("C:\\AA\\MYNEWFILE.TXT", "w");

if (f==NULL) perror ("Error in fopen");

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How do you create .exe file in c plus plus?

You can create an exe-file from your C++ source, if you have a compiler.


What is a source code file in c plus plus?

A source code file is a plain-text file containing C++ instructions. The instructions must be compiled and linked to create a native machine code executable.


Can you read a file after created by a program in C plus plus?

Yes. You can either create a file for both reading and writing, or you can re-open a file for reading after creating and writing to it.


How do you create a simple student file in C Plus Plus?

Whenever you open a file using the function open of fstream class (header file) by using one of it's object you have created, the file is created automatically.You can do it this way:fstream filer;filer.open("Student.dat",ios::out);//This will create a file.This is just a code segment.


How do you open a file in c plus plus?

fopen()


Is there a file concept in c plus plus?

No. The standard does not define nor require a file concept.


Can you rewrite a cuda file in c c plus plus language?

Yes, you can rewrite a cuda program originally written in c in c plus plus.


What is a scatter file in c or c plus plus programming?

Scatter File is a linker script file used by RVCT/Keil for ARM processors. It is used by arm linker.


Explain any six file commands in C plus plus?

There's no commands in C++.


How do you create a header file and implementation of code in another c file and both should be retrieved by another .c file?

tanga


How do you concatinate two files in c plus plus?

Copy the first file then append the second file to the copy.


How do you convert a notebook file to a c plus plus file?

There are no "notebook files"; C++ sources are ordinary text files. When you save a file from NotePad, select File/SaveAs and select 'file type: all', then enter the name, e.g. myprogram.cpp