C++ Working with Files - fstream I/O library
- 3 hours on-demand video
- 1 article
- 14 downloadable resources
- Full lifetime access
- Access on mobile and TV
- Certificate of Completion
Get your team access to 4,000+ top Udemy courses anytime, anywhere.Try Udemy for Business
- how to operate on input and output streams
- how to open and close files and how to handle errors connected to that operations
- states of file opening
- stream’s error flags
- how to check size of opened file
- what are binary files and how to compare them
- how to extract and save content of file
- how to create mini database that allows you to:
- add, show, search, remove, load, save people
- many functions that supports working with files
After this lesson you will know what you will learn in this course.
What is stream, input and output. We are making ourselves familiar with word stream, input and output.
Your learn how to close and open files and how to check if the filed was opened properly. You also learn how to simply put text into file.
You learn file opening modes (states) and differences between them. We learn how to open file and:
- make it readable
- make it writeable
- being able to add content to it
- treat it as binary file (we also learn difference between binary and text file)
- keep the content / truncate content after opening
We discuss all stream's error flags and we show how to use them. You will know how to react on unexpected situations that happens during reading from the file like for example assigning string to integer or opening file for writing which had the flag set to only reading (ios::in)
You will know functions like:
and you will know how to operate on states (failbit, goodbit, badbit, eofbit) using bitwise operators and rdstate function.
You will know how to read whole file using one loop and eof function.
You will know how read function works. We are creating function that is counting size of file and function that is checking if two binary files are the same. We are training pointers on practical example. We also learn abot memcmp function which is used to compare memory.
- You should be familiar with basics of C++ like variables, pointers, functions, structures, loops, arithemtic / bitwise / relational / logical operators
- You should have an installed IDE for example CODE::Blocks / Dev C++ / Visual C++
If you want to learn how to work with files in C++ language using the fstream (file stream) library then you are in the right place!
You do not need to know anything about operating on files, but it's good idea to know the basics of C++ language.
After this course you will know:
how to operate on input and output streams,
how to open and close files and how to handle errors connected to that operations,
states of file opening,
stream’s error flags,
how to check the size of an opened file,
what binary files are and how to compare them,
how to extract and save the content of a file,
how to create a mini database that allows you to add, show, search, remove, load, and save,
many functions about working on files
This course consists of over 2 hours of great content. Before buying, please watch free videos so that you will see for yourself if you like the way I teach.
Over 235,000 students bought my courses and most of them are happy. You will also be satisfied with this course. If you do not like the course, remember that within 30 days you can request a full refund. I guarantee you satisfaction.
If you have any questions regarding the topics covered in this C++ course, please feel free to ask. I'm always happy to help those who want to learn!
Please check out the free lessons first! See for yourself the great quality of my course and enjoy it!
- This course is meant for beginners who already have some basic knowledge of C++. You should be familiar with variables, pointers, functions, structures, loops, arithmetic / bitwise / relational / logical operators. If you know these terms, you can continue your C++ adventure with this course; otherwise you may consider catch up on the basics first.
- This course is probably not for you if you do not have any experience with C++ language