0:00 was going guys and this Bucky with your third c plus plus 0:03 tutorial. And in this tutorial I wanna go over a little more about printing 0:07 text on the screen. Now in the last tutorial you remember that we could use 0:12 that special thing cout 0:14 which is technically called output object and the less than less than sign which 0:18 was called 0:19 the stream insertion operator to print out text on the screen. in 0:23 the way we did this is the added double quotes after and whatever we printed out 0:28 in this double quotes. "boy I love 0:31 bacon" wherever we put inside those double quotes 0:34 which is print out on the screen. So if we go ahead and rebuild and run this 0:38 we saw "boy I love bacon" right on-screen. 0:42 simple enough. but now what I want to go over is 0:45 just a little more about cout. I just want to make sure you guys 0:49 understand how it works 0:50 so each function is made up of these things called 0:54 statements and typically people per one statement 0:57 per line of code I remember all statements and with semicolons. 1:01 so say we wanted for now something else on screen well you would write cout 1:05 less than less than and get something out like 1:09 "and ham" just like that. So you might be thinking, alright, I gotta feeling I know what this is gonna 1:14 do 1:14 on the first line is going to print out "boy I love bacon" and on the second one 1:18 is going to print out and am because you know 1:20 that's how it appears in our code so that's what it's gonna do. 1:23 but we go ahead and run this. it says boy I love bacon and ham 1:28 all on the same line of code. and if you are scratching your head, alright, 1:32 why exactly does it do that. the reason it does that 1:35 is because when you're using this thing called cout 1:39 it's called printing out into a stream 1:42 and it pretty much takes all your characters and prints them out 1:46 in the same stream. So, whenever this stream is done 1:49 you're not telling it to move to a new line. you're saying 1:52 print out these characters and then stop rate the and end of this line. 1:57 so then the stream starts printing out and again you not telling and you were to 2:02 move to a new line 2:03 computer programs are very picky and they need to be told 2:06 exactly what to do so in order to move to a new line 2:10 we need to add a special symbol. I guess you would say 2:15 and the symbol is this for small you need to add another extreme insertion 2:19 operator 2:19 and you can go ahead and write ENDL 2:23 what this means is end line and 2:26 when we go ahead and build and run it, check what happens 2:30 It runs. "boy I love bacon" and then it runs 2:34 in line an before your stream insertion operator would be right here 2:38 but now since you said in line and go-ahead and ends this line 2:42 in it moves it to the next line, so basically all you have to remember is 2:46 anytime you want to move to a new line use the character 2:49 ENDL which is code word for and line 2:52 now if your are saying alright that's easy enough to remember 2:55 so let me go ahead and show you something that might be even easier for 3:00 you 3:00 inside your quotation marks if you go ahead and add 3:04 backslash "n" this is basically the same 3:08 is adding a new line backslash an 3:11 is the code. I guess at all is code. 3:14 for go to a new line. so now it's gonna say "boy I love bacon" 3:19 and then it's going to come across this thing called back slash and its can say hold 3:23 on 3:23 what is this backslash n. I know what is 3:26 it's a symbol to move to a new line so this is it 3:30 basically just an alternative way to move to new line. 3:33 the only difference is when ENDL, you need to add 3:38 another insertion operator and then write ENDL right there 3:41 with the new line you write it inside the quotation marks because 3:45 it gets interpreted and different kinda way. so let's go ahead and build run this 3:48 and just verify that. Yep "boy I love bacon 3:52 new line "and ham", so again 3:55 like I said whenever you want print text on a new line you have to be very 3:59 specific with C++ 4:01 and tell you exactly what to do and you can do this 4:04 either using the ENDL or the new line 4:07 echoes inside the quotation marks. So aside from this you might think 4:11 alright, so I print this out and I got 4:14 this on next time but what if I wanted a blank line in between these two 4:18 well all you have to do is write new line new line 4:22 and then we go ahead and you going to run this, ok say alright 4:25 "boy I love bacon" new line new line 4:29 and then a printed out "and ham". simple enough 4:32 pretty cool huh? and I guess one other thing I can show you is 4:35 if you go ahead and do cout 4:38 insertion operator, uhm, you can do things like this 4:42 boy newline I in line 4:46 love newline bacon 4:50 newline. so, you know you're not only limited to 4:53 you know one new line per statement. you can have multiple new lines 4:56 um in a single statement. so now it says 5:00 "boy I love bacon" pretty cool, huh? 5:03 so that's all the basics I wanted you guys for this tutorial. 5:07 I wanted to stress how to print out text on the screen 5:10 and also the stream insertion operator. 5:14 It's basically this, each stream insertion resumes 5:19 its printing out wherever the previous one stopped, so if you want to move it to a 5:23 new 5:23 line you need to use one in these new line symbols either ENDL 5:27 or new line. so that I have for you guys in this tutorial and now you should be a pro at 5:32 printing text on the screen 5:33 so you know we're not ready to bundle up this program and sell to Microsoft yet, 5:38 by hey 5:38 it starts up yes watchin if you have any questions go to my website newboston 5:42 dot com 5:43 and ask me on my forum, so thank you for watchin and I'll, uh, 5:47 I guess I see you in the next video