-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFile.cpp
More file actions
19 lines (12 loc) · 1.25 KB
/
Copy pathFile.cpp
File metadata and controls
19 lines (12 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
File I/O in C++: Working with Files | C++ Tutorials for Beginners #59
In this tutorial, we will discuss file input and output in C++
The file is a patent of data which is stored in the disk. Anything written inside the file is called a patent, for example: “#include” is a patent. The text file is the combination of multiple types of characters, for example, semicolon “;” is a character.
The computer read these characters in the file with the help of the ASCII code. Every character is mapped on some decimal number. For example, ASCII code for the character “A” is “65” which is a decimal number. These decimal numbers are converted into a binary number to make them readable for the computer because the computer can only understand the language of “0” and “1”.
The reason that computers can only understand binary numbers is that a computer is made up of switches and switches only perform two operations “true” or “false”.
File Input and Output in C++
The file can be of any type whether it is a file of a C++ program, file of a game, or any other type of file. There are two main operations which can be performed on files
Read File
Write File
stream is an interface in c++ of data transfer for i/p or o/p from or into the file
*/