answersLogoWhite

0

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.

User Avatar

Wiki User

9y 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.


How do you create the robotstxt file?

With some notepad. It is simple text file.


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.


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.


How to create a batch file and impliment it?

To create a batch file open notepad, textedit, or whatever editor you wish to use. Once open write your program, check for errors, and "make simple text." Save this program as whateveryouwant.bat. Open the file and the batch file will execute.


How do you add a new library for Dev C plus plus?

If you want to know about adding new header files, then it is simple. Write your functions in a file. Save that file with extension .h in the include directry. Now, you can include this file using the #include directive


Can you file a lawsuit if a student assaults another student?

Can the student that was attacked file a lawsuit? Yes, they certainly can. Can anyone else file a lawsuit? Only if they were injured or can show damages.


What is file-new ctrl plus s?

These are two separate commands. File-New creates a new file although in an IDE you must select the type of file you wish to create. CTRL+S saves the currently active file.


Do you have to file taxes if you are a student?

If you are 21 you have to file taxes


If you file chapter 7 bankruptcy does that eliminate paying back the parent plus college loan?

Student loans are exempt from bankruptcy as are IRS debts


What has the author Madeline McHugh written?

Madeline McHugh has written: 'English plus 5' 'Song book' 'File Pre-Intermediate - Student's Book' 'Fanfare'


What is a COM file?

COM file is a simple type of executable file.