Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
Web Technologies
39.8k+ articles
C++
4.1k+ articles
Linux-Unix
2.7k+ articles
C++ Programs
2.4k+ articles
C Language
1.9k+ articles
C Programs
780+ articles
CPP Examples
700+ articles
C Examples
95 articles
cpp-file-handling
57 articles
misc-cpp
35 articles
C++ File Programs
22 posts
Popular Articles
Recent Articles
cin.ignore() Function in C++
Last Updated: 22 August 2024
The cin.ignore() function in C++ is a member function of the std::istream. It is used to ignore (or discard) certain number of characters fr
...read more
cpp-file-handling
C++
C++ Programs
C++ File Programs
cin.clear() function in C++
Last Updated: 22 August 2024
The cin.clear() function in C++ is a member function of the std::istream class, which is used to clear the error flags on the cin stream. Wh
...read more
cpp-file-handling
C++
C++ Programs
C++ File Programs
How to Get Current Directory in C++
Last Updated: 17 June 2024
The current working directory, also known as the present working directory, is the location on the file system where the executing program i
...read more
C++
C++ Programs
Picked
C++ File Programs
CPP Examples
Similar Topics
Web Technologies
39.8k+ articles
C++
4.1k+ articles
Linux-Unix
2.7k+ articles
C++ Programs
2.4k+ articles
C Language
1.9k+ articles
C Programs
780+ articles
CPP Examples
700+ articles
C Examples
95+ articles
cpp-file-handling
57+ articles
misc-cpp
35+ articles
Difference Between .cc and .cpp File Extensions in C++
Last Updated: 29 May 2024
In C++, we use different file extensions to store our code. Two of the most common extensions are .cc and .cpp both store C++ codes. Althoug
...read more
C++
C++ Programs
Picked
C++ File Programs
CPP Examples
misc-cpp
How Can I Get a File Size in C++?
Last Updated: 28 May 2024
In C++, we often need to determine the size of a file which is the number of bytes in a file. This is done for various applications, such as
...read more
cpp-file-handling
C++
C++ Programs
Picked
C++ File Programs
CPP Examples
misc-cpp
How to Read File into String in C++?
Last Updated: 21 May 2024
In C++, file handling allows us to read and write data to an external file from our program. In this article, we will learn how to read a fi
...read more
cpp-file-handling
C++
C++ Programs
Picked
C++ File Programs
CPP Examples
How to Delete a File in C++?
Last Updated: 16 May 2024
C++ file handling allows us to manipulate external files from our C++ program. We can create, remove, and update files using file handling.
...read more
cpp-file-handling
C++
C++ Programs
Picked
C++ File Programs
CPP Examples
What is the Efficient Way of Reading a Huge Text File?
Last Updated: 21 April 2024
In C++, reading a large text file efficiently requires a careful approach to ensure optimal performance in terms of memory usage and process
...read more
cpp-file-handling
C++
C++ Programs
Picked
C++ File Programs
CPP Examples
How to Check a File or Directory Exists in C++?
Last Updated: 26 April 2025
Checking the presence of a directory or a file is one of the most common operations performed by a file system in an Operating System. Most
...read more
Technical Scripter
C++
C++ Programs
Picked
C++ File Programs
Technical Scripter 2022
C++ Program to Append a String in an Existing File
Last Updated: 28 July 2022
Here, we will build a C++ program to append a string in an existing file using 2 approaches i.e.Using ofstreamUsing fstreamC++ programming l
...read more
C++
C++ Programs
Picked
C++ File Programs
C++ Program to Copy the Contents of One File Into Another File
Last Updated: 25 July 2022
Here, we will see how to develop a C++ program to copy the contents of one file into another file. Given a text file, extract contents from
...read more
C++
C++ Programs
C++ File Programs
C++ Program to Count the Number of Spaces in a File
Last Updated: 01 August 2022
Here, we will see how to count number of spaces in a given file. First, we will read the contents of the file word by word, keep one counter
...read more
C++
C++ Programs
C++ File Programs
C++ Program to Create a Temporary File
Last Updated: 31 July 2022
Here, we will see how to create a temporary file using a C++ program. Temporary file in C++ can be created using the tmpfile() method define
...read more
C++
C++ Programs
Picked
C++ File Programs
C++ Program to Read Content From One File and Write it Into Another File
Last Updated: 04 July 2022
Here, we will see how to read contents from one file and write it to another file using a C++ program. Let us consider two files file1.txt a
...read more
C++
C++ Programs
Picked
C++ File Programs
C++ Program to Copy One File into Another File
Last Updated: 20 June 2022
To copy the text/contents of one file to another file, we should know the basics of reading and writing a text file in C++. To copy the file
...read more
C++
C++ Programs
Picked
C++ File Programs
1
2
>>
Last
1
2
>>
Last
1
2
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !