[MUSIC] The next group of videos will be about coding in C++. In some ways, C++ is a modern C and there are many reasons to prefer it to coding in C. One reason is that it is coding in C. So you don't have to change very much and you get the benefit of certain modern changes that make for a more high-level view of coding, which makes coding easier. The other thing, which many of you might be interested in, is to go on to the next series of courses, which is C++ for C programmers. So there are going to be two benefits. One is just that you'll get a quick and easy way to jump on to some of the neat features of C ++. And secondly, if you want to continue with these studies that I'm providing on Coursera, This will ease your transition. So what's the good news in moving to C++? C is essentially a subset of C++. It's not a complete truism, there are a few things that are different so that if you were to run them in a C++ mode they would either not work or have some different semantics than when run in a C mode. But by and large, most everything is the same. C++ has memory improvements that make programming easier. Now, one reason C++ gets a bad wrap is that it's extremely complex. It's a very, very large language when you include all of the libraries and constructs like templates. And in most instances you don't need a lot of that stuff or you can use the very basic parts of that stuff readily and yet it'll make your coding easier. And we're going to see that in this introduction. A third thing is C++ compilers are often bundled with C compilers. So in the GNU compiler system, instead of using GCC you use G++, you would be running your code as if it was C++ code. Okay, one of the first things we're going to look at is that C makes input output easier than C++. Output in C++ could look like this. Cout two less than signs which are in effect a shift operation, quote, C++ is an improved C; semicolon. This shifts this string to the screen. Notice there's no printf involved and it's sort of intuitive in the sense that, take this and move it over here, cout being standard out. Technically this operation which is a shift operation is overloaded to provide output behavior. Similarly, input is easier. You do a cin, shift in the other direction, miles and this is telling you from your standard in typically your keyboard, if you enter something it's going to become converted into miles appropriately. And there's no need, again, for formats or an ampersand sign. So again, it's intuitive. I'm going to demonstrate that in some code almost immediately. But let's first give kudos to how C++ was invented. The brief history is that it was invented at Bell Labs where it came into fruition in 1985 by the computer scientist Bjarne Stroustrup. He originally called it C with classes and he as a Scandinavian student, was exposed to a language called Simula which was the original language for dealing with this abstract data type, this piece of structure. Remember, a lot of what we're doing is providing structure to your coding, and structure helps, structure encapsulates, structure prevents lower level errors. So Simula was the first real language with classes. He was enamoured with it, but now he was an employee at Bell Labs. Everything at Bell Labs was basically done with C, so he embedded classes in C and combined them. What were the advantage is that it was free. Bell Labs, just provided things like the C and Unix system for free because it was a telephone company and was otherwise at that time a monopoly. So that was one way it was doing good to society. I've been writing a lot of research for free, it was based on C. So people who already knew C almost instantly could add whatever they thought is appropriate. It was highly efficient. So, a major contender language at the time that had classes was small talk, but small talk was very expensive to run, very time consuming. C compile directly to native code. C has always been something that was efficient, small talk compile to an interpretive code. Now, C++ has kept evolving, the most stable and what most people are now using is C++ 11, or in some cases, even more advanced. And that's the form of the language that we will discuss in C++ for C programs, okay. [MUSIC]