C++ Operating on Files

Learn how to easly use fstream library with the help of expert in that matter
4.1 (30 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
1,469 students enrolled
$30
Take This Course
  • Lectures 17
  • Contents Video: 3 hours
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 10/2014 English

Course Description

This course is about operating on files in C++ language using the fstream (file stream) library.

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.

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:

  1. how to operate on input and output streams,
  2. how to open and close files and how to handle errors connected to that operations,
  3. states of file opening,
  4. stream’s error flags,
  5. how to check the size of an opened file,
  6. what binary files are and how to compare them,
  7. how to extract and save the content of a file,
  8. how to create a mini database that allows you to add, show, search, remove, load, and save,
  9. many functions about working on files

Over 1000 students bought my course, and all of them are happy. You will also be satisfied with this course. If you do not like the course, remember that you can take for 30 days a full refund. I guarantee you satisfaction.

If you have any questions regarding the topics covered in this course after watching the videos please feel free to ask. I'm always happy to help.

What are the requirements?

  • You should be familiar with basics of C++ like variables, pointers, functions, structures, loops, arithemtic / bitwise / relational / logical operators
  • You should have installed IDE like CODE::Blocks / Dev C++ / Visual C++

What am I going to get from this course?

  • 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

What is the target audience?

  • This course is meant for beginners who knows basics of C++. You should know variables, pointers, functions, structures, loops, arithmetic / bitwise / relational / logical operators. If you know these terms you can easly start adventure with this course otherwise it's good idea to catch up.
  • This course is probably not for you if you do not have any experience with C++ language

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Introduction
03:26

After this lesson you will know what you will learn in this course.

06:27

What is stream, input and output. We are making ourselves familiar with word stream, input and output.

Section 2: File Stream Library (fstream)
06:27

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.

13:24

You learn file opening modes (states) and differences between them. We learn how to open file and:

  1. make it readable
  2. make it writeable
  3. being able to add content to it
  4. treat it as binary file (we also learn difference between binary and text file)
  5. keep the content / truncate content after opening
17:41

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:

  1. fail
  2. good
  3. bad
  4. eof
  5. clear
  6. rdstate

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.

08:53

What are and how to use reading position pointer. How to programitically check how many bytes the file has. You will learn and understand functions that reads and sets position of reading pointer.

03:56

You will know what is and how to use writing position pointer. You will learn functions seekp and tellp which allows you to retrieve and show where is the writing pointer.

15:26

You will learn:

  1. how function getline and ignore works
  2. how to retrieve all lines of text from file at once
  3. how to ignore characters that are not needed
  4. how to extract from file with names and surnames only initials
25:11

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.

04:17

You will learn hot to load characters from standard input (cin) and put them into the file. In addition to this you will learn how to add after each letter of string a space or any other character.

03:42

You will learn function that allows to peek characters before exracting and you will know how to retrieve information from steam in order to assign variables to the right type of variables.

02:38

You learn how to return extracted character back on the stream so it can be read again

05:42

You will learn how to save bytes to files and when you should use write function over saving operator (<<)

03:35

You will learn how to get count of characters retrieved from file on practical example.

Section 3: Summary
18:05

Lesson where you gonna learn how to create mini database that allows you to:

- add people

- show added people

23:58

You gonna learn how to:

- save people to file

- load people from file

- search base by typing name

- remove person by id

What after the course?
01:57

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Arkadiusz Włodarczyk, Excellent teacher, Expert in Programming

I am the author of 27 very popular video courses about programming, web-development and math in Poland. I've also created 7 video courses in English. Over 14,000 people enrolled in my Udemy courses. I put all my heart into creation of courses. I always try to explain everything the easiest possible way. I'm sure that my courses will help you in the programming and web development adventure :)

I believe that everyone has the ability to develop software if they are taught properly. Including you. I'm going to give you the context of each new concept I teach you. After my course you will finally understand everything that you code.

I've been developing websites for over 14 years and i've been programming for over 10 years. I have enormous experience in that matter and I want to share with you my knowledge.

If you have any questions regarding covered topics please feel free to ask.

Ready to start learning?
Take This Course