C++ File Handling | Creating and Opening | fstream, ifstream, ofstream | Video Tutorial

preview_player
Показать описание
This c++ Video tutorial introduces you to file handling and explains how to create and open files.

You are gonna learn how to use classes such as fstream, ifstream, ofstream, how to create an object of fstream class, how to associate a file with a stream, which file opening modes are available,how to open a file using a specific file opening mode, how to check whether a file has opened successfully or not, how to close a file in detail with example.

Learn Programming in HINDI at our youtube channel

Catch us on SocialMedia
Рекомендации по теме
Комментарии
Автор

Thank you! I always need a refresher on opening files. Very clear explanation.

texasFilmLock
Автор

I searched long just to find how to open a freaking txt file without ereasing the existing content.... tank you man!

brandondupuis
Автор

Hey, my man !!
thankyou so much.. your entire playlist is what I've been searching for . .. . .. >> :)

khire
Автор

Thanks for mentioning the "std::ios::trunc" part!

ParhamSalamati
Автор

Yaffstream !!!
It was really helpful!!

AVIDSTINGRAYGAMING
Автор

YOU HELPED ME A LOT BY GIVING THAT TRUNC MODE.. THANK YOU BUDDY

sanchitchakraborty
Автор

Hello Learning Lad thanks for this vid.
You used this code
if(!file.is_open()){
cout<<"error while opening the file.;
}
You could do this in another way.
if(file.fail()){
cerr<<"error while opening the file";
}
Thanks for explaining.
It is better than the book I use to learn c++.

billjo
Автор

great explanation Sir,
thank u so much

saimkhan
Автор

its trunc for truncate and not trunk.
nice videos and very cool channel

malikjunaid
Автор

too good explanation.... helped a lot...

VaidehiSoni
Автор

Good Video!

But can you tell me how you showed this pen?

catakuri
Автор

which is that paint brush tool software u r using ?, osum that one can easily write on transparent desktop.

rajath
Автор

Is there a way to open up something on a browser, like a youtube video?

awesomesauce
Автор

can v read a file desired by user
Or
can v copy the name input by user to the
Obj. read('' '')
In b/w those double cotes

animeshpandit
Автор

sir using nfile a project in which add data, search, delete, and display....

rammaeshu
Автор

I have a doubt
about how to open a file that exists in a non-working directory
suppose I have my C++ file in path C:/Coding/57th Code/main.cpp
I want to open a file that is in path C:/CS19B005/text folder/hello.txt

Now how can I access file

CSBBADRIGAUTAM
Автор

your explanation is good but your accent .. sometimes it become hard to understand what you are saying

anjalibalayan
Автор

sir i just use
file.open("a.txt");
and its already opened

aszasq
Автор

Sir on using fstream header error is coming.given below is the error:
Fatal error:Fstream.h: no such file or directory
How can we remove this error

mrharsh
Автор

You were using the bit wise OR operator '|' instead of using the logical OR operator '||'.

anandsaha
visit shbcf.ru