So what were the C++ improvements? Now here's my sales job and I'm selling this in terms of yarn. Note to Benny, okay. So it's just the semi-erudite term meaning note well, Nota Bene. Some of these are adopted in modern C 99. Again, so you thought that I'm aware of that. So that the difference is there's been some convergence as things of prism cells really worthwhile in C++ that don't necessarily change the structure of C a few of these things have been adopted. Almost all the old C libraries are still available usually with that C lead in. Inline replaces code macros, and you gotta again be a programming methodologist or read the literature about where mistakes get made. But macros are a big place where mistakes get made. And then we've also seen rest of the line comments. So so far those are improvements. Now let's look at the main part of the program. If we look at the program, it looks somewhat like the C program. Again, why? This is initializing. Seeding the random number generator, and now we see another thing that I want you to, a big take away. Instead of print f there is this cout. Cout, if I hadn't had the using directive, could also be written this way. This is the scope resolution operator. So again, this is one of the new things in C++. It gives you more context than C gives you. It allows you to use multiple libraries from different name spaces. But because of using, I don't need that, so using, I always throw in using the standard library because most cases, that's what I'm gonna use. And in most cases I don't wanna have to type in all those extra characters. Cout is going to be on your computer, typically your screen. So if you say count enter number of trials, popping up on your screen you'll see the phrase enter number of trials. What's this funky little \n? That's a new line. So if you recall, it's the same in C, anytime you have a backslash, that's an escape. And then \n, \t, is a tap character, there's \bell, where you can ring the bell on your computer. So cout has this syntax that uses this operator. This operator in the C community is a bit shift. But in C++, it retains bit shift, only when the arguments to it make it the bit shift. And these arguments, cout, is what's called an o scream. So we have an ostream. Followed by this operator. And this operator is what's called overloaded. Overloaded, meaning. Has a new meaning. So one of the things we're gonna be able to do in C++ is function and operator overload. Key new idea, an interesting idea. We'll see what its value is here's one of these values. The IO system, in C++, expects bit shift to be used in terms of IO. It tends to not be used very often, for bit shift. So this is saying, look at string value, the double quotes meaning this is string value. It knows that it's a string value and it knows how to print the string value. Later we're going to give it values that are integer or float, we'll know how to print those as well. Another thing we see here that's new is an interleave declaration that's not at the head of the block. So this declaration is interleased. And starting to really use all of this screen space. It's okay. And then, we have an input statement, which can be compared to scanf, except that the input statement says take from, in this case the keyboard, so you type in at the keyboard, how many trials you want in the simulation. And that's a cin. And again, this is a much easier scheme. It's type safe, it's convenient, it's easy to understand, it's intuitive to doing I/O. Okay, let's take a little quiz, a very trivial quiz. We've already heard this. Again, why srand? Why calling that standard function? Srand initializes the random number generator. Don't want the same results each time in a simulation. The clock returns a processed time in terms of number of clicks. It's a large unsigned number. It's fine grained and different when main starts running. Again. During this class, I'm going to show many different simulation programs. So I am going to expect that you will get a fair amount of familiarity with this kind of Monte Carlo process. It's very important, and very useful as you'll see.