answersLogoWhite

0


Best Answer

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

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

9y ago

Static libraries (*.lib): Static libraries have no entry point. Compile the project as normal but do not link the object files -- use lib.exe instead. Your compiler should have a switch to prevent linking.

Dynamic libraries (*.dll)

If you need an entry point, use dll_main. Use your compiler's DLL option to create the DLL.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

Use fopen(), fclose(), fread(), fwrite() and fseek(), all of which are contained in the standard library.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

Open a file for writing. If the file doesn't exist, it will be created.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

Hello, I am syed anwar pasha

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you create a file in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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()


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.


Is there a file concept in c plus plus?

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


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


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 concatinate two files in c plus plus?

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


How do you easily create Excel files in c?

You might be able to use C to extract data from an Excel file, but there is no easy way to write a program to create an Excel file.