1 00:00:05,300 --> 00:00:06,960 In this section of the course, 2 00:00:06,960 --> 00:00:10,460 we'll look at how c++ uses streams for IO. 3 00:00:11,560 --> 00:00:15,460 First, we'll learn what streams are, and how they help abstract the complexity 4 00:00:15,460 --> 00:00:19,340 away from working with different types of input and output devices. 5 00:00:20,000 --> 00:00:23,300 Then we'll learn about some of c++ stream manipulators. 6 00:00:23,300 --> 00:00:27,660 These are functions that can affect how we read and write data to and from strings. 7 00:00:28,160 --> 00:00:31,410 Then we'll learn about sum of c++ stream manipulators. 8 00:00:31,410 --> 00:00:35,610 These are functions that can affect how we read and write data to and from streams. 9 00:00:36,270 --> 00:00:41,150 We'll learn about stream manipulators that affect Boolean integer and floating point values. 10 00:00:41,150 --> 00:00:45,850 And then we'll use some manipulators that work with any type of data to help us format our output. 11 00:00:46,450 --> 00:00:49,450 These manipulators give us the ability to align text, 12 00:00:49,450 --> 00:00:53,650 fill blank areas with specific characters and set the width of output fields. 13 00:00:54,450 --> 00:00:57,600 Then we'll do a challenge where we'll use the manipulators to format a 14 00:00:57,600 --> 00:01:00,800 report containing information about tours to South America. 15 00:01:02,100 --> 00:01:05,900 After the stream manipulators, we'll learn about input files. How to open them, 16 00:01:05,900 --> 00:01:09,500 check to see if they were opened successfully, read from them and then close them. 17 00:01:10,300 --> 00:01:13,300 We'll read from them using both formatted and unformatted IO. 18 00:01:14,100 --> 00:01:16,700 And we'll do two challenges using input files. 19 00:01:16,700 --> 00:01:19,060 The first is to create an automated grader, 20 00:01:19,060 --> 00:01:23,420 that will grade student quiz responses from a text file and produce a report of the results. 21 00:01:24,220 --> 00:01:25,580 For the second challenge, 22 00:01:25,580 --> 00:01:28,880 we'll ask the user for a word and see how many times that word appears 23 00:01:28,880 --> 00:01:32,980 in Shakespeare's play Romeo and Juliet, which is stored on a file and disk. 24 00:01:33,530 --> 00:01:35,890 Then we'll learn about output files and how they work. 25 00:01:35,890 --> 00:01:40,880 We'll learn to open them, write to them in both formatted and unformatted modes and close them. 26 00:01:42,200 --> 00:01:46,800 And then we'll do another challenge that creates a copy of Romeo and Juliet, but adds line numbers to the play. 27 00:01:47,790 --> 00:01:51,090 Then we'll wrap up this section by looking at string streams. 28 00:01:51,090 --> 00:01:54,990 This allows us to use in-memory strings as streams 29 00:01:54,990 --> 00:01:58,090 and use the same IO techniques that we use with files 30 00:01:58,090 --> 00:02:00,590 with in-memory strings, it's very powerful, 31 00:02:00,890 --> 00:02:04,190 and we'll also see how we can use string streams for data validation. 32 00:02:04,690 --> 00:02:08,490 As you'll see in this section, IDE is different where they store files 33 00:02:08,490 --> 00:02:10,090 for use within the IDE. 34 00:02:10,690 --> 00:02:12,460 In the last video of the section, 35 00:02:12,460 --> 00:02:16,450 I'll show you how to set up external text files for reading in visual studio, 36 00:02:16,450 --> 00:02:18,810 code blocks,c line and XCode. 37 00:02:19,310 --> 00:02:21,510 Okay we've got a lot to get to, let's get going.