[go: up one dir, main page]

0% found this document useful (0 votes)
29 views10 pages

C++ Basics

This document provides an overview of C++ file handling. It introduces Veeresh Basetti, Vinayak Bhushetti, and Vikas Sakkari who will present on the topic. The presentation covers I/O streams, the different types of files in C++ (text and binary), and the advantages of using files. It also discusses the ifstream, ofstream, and fstream classes used for file input/output and their purposes.

Uploaded by

Brainz on Mob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views10 pages

C++ Basics

This document provides an overview of C++ file handling. It introduces Veeresh Basetti, Vinayak Bhushetti, and Vikas Sakkari who will present on the topic. The presentation covers I/O streams, the different types of files in C++ (text and binary), and the advantages of using files. It also discusses the ifstream, ofstream, and fstream classes used for file input/output and their purposes.

Uploaded by

Brainz on Mob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

C++

PRESENTATION
Veeresh Basetti
Vikas Sakkari
Vinayak Bhushetti
MEET OUR TEAM

VEERESH BASETTI VINAYAK BHUSHETTI VIKAS SAKKARI


Object Oriented Program

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

Here are the lists of standard file handling classes:

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

 The bits are represent printable character.


 One byte per character for ASCII, the most common code.
 Example: Java source and Text files.
 So is any files created with a “Text Editor”.

 BINARY FILES

 The bits represents other types of encoded information, such as


Excutable Instruction or Numeric Data
 These files are easily read by the computers not humans
 They are not “Printable Files”
Object Oriented Program

ADVANTAGES OF
FILES

 Can edit data, Prepare ahead of Time


 Can rerun file without reentering data
 Can examine output as leisure
 Can display output to screen or print
 Can use output as inputinto another program
THANK
YOU

You might also like