Professional Documents
Culture Documents
C++ Basics
C++ Basics
PRESENTATION
Veeresh Basetti
Vikas Sakkari
Vinayak Bhushetti
MEET OUR TEAM
TOPICS
I/O STREAM
FILES
TYPES OF FILES
ADVANTAGES OF FILES
BINARY FILES
Object Oriented Program
I/O
STREAM
Object Oriented Program
I/O Streams
In order to handle files in C++, we use classes which are derived from
fstream base and the associated iostream class and are explicitly
designed to handle disk files.
1. fstream: This is a built in library, it provides the two file handling classes
named ifstream and ofstream.
2. ifstream: This file handling class in C++ signifies the input file stream and
is applied for reading information from files.
3. ofstream: This file handling class in C++ signifies the output file stream and
is applied to create files for writing information to files.
Object Oriented Program
FILES
Object Oriented Program
FILES
What is file?
A file can be defined as a place on disk (secondary memory) wherein we store
data for further or future use.
Examples:
Text files : *.txt, *.c, *.cpp, *.py, *.doc, *.pdf, *.xls, *.bmp, *.jpg, etc.
Binary files : *.exe, *.com, etc.
Why files?
Sometimes, it is necessary to store input or output data for future and is
possible by creating files.
Sometimes, we need to give more inputs to the written program and is
possible by giving existing file as input.
Sometimes, write output to a file and is possible by file handling.
Object Oriented Program
TYPES OF FILES
TEXT FILES
BINARY FILES
ADVANTAGES OF
FILES