This course is designed to give you everything you need to be productive with modern standard C++. Not every aspect of the C++ language is considered (that would be impossible in a few hour course); instead, the course is focused on some important practical-oriented features of the language. The language features discussed in this course will be shown in action with concrete C++ code samples. This course is a mix of slides and C++ demos. Even basic concepts will be explained, using interesting visuals and metaphors. In this course, C++11 from Scratch, you will begin your C++ journey learning how to compile your C++ code. First, you will start from a simple Hello World program. Next, you will learn how to represent data in your C++ programs with types and variables. Then, you will discover how to write code to make decisions and iterating. Finally, you will explore the basics of the STL vector container, and you will learn how to define your own classes. After following this course, you will be able to learn further C++ elements including minor C++14 additions, building on the solid modern C++ knowledge of this course.
Giovanni Dicanio is a computer programmer specialized in both cross-platform C and C++, and Windows operating system development. He is a Microsoft MVP for Visual C++. He also blogs on msmvps.com/gdicanio.
Course Overview Hi everyone. My name is Giovanni Dicanio. Welcome to my course, C++11 from Scratch. I am C++ programmer, a Pluralsight author, and a Microsoft MVP. C++ is a very powerful and widely-used programming language successfully applied in so many fields ranging from system programming, computer graphics, video games, physics simulations, and the machine learning just to name a few. This course will teach you important practical concepts of modern C++11. No prior experience with the C, C++, or other programming language is required. Some of the major topics that we will cover include basic practical elements of good, clean, modern C++ representing information with the types and variables, making decisions and iterating it in your code, storing and processing items using the standard vector container, and developing your own classes. By the end of this course, you'll be productive with modern C++11 and be ready to develop applications of your own using the clean, good, modern C++. From here, you should feel comfortable diving into more advanced C++ topics and to learn minor additions introduced in C++14. I hope you'll join me on this journey to learn modern C++ with the C++11 from Scratch course, at Pluralsight.
Building C++ Programs Hi. This is Giovanni Dicanio. Welcome back to this module on Building C++ Programs in this course on modern C++11 from Scratch. In this module, we'll break the ice with C++. You'll write your first C++ program and you'll learn how to build an executable binary file from that code as well. So let's start this very interesting C++ journey together. So since C++ programs are built using a C++ compiler, I'll start introducing that tool. Then, you will learn how to build your first C++ program. Following a classic tradition, this first program will simply print a Hello World message to the console to the terminal. Despite its simplicity, this will give you an occasion to both see the build process in action and to take a first look at the structure and the syntax of C++ programs. Finally, you'll learn some additional details on the build process, details of that will come in during your C++ work. In particular, I'll introduce you to the preprocessor and to the linker. So let's get started introducing the concept of C++ compiler in the next clip.
Representing Information with Types and Variables Hi. This is Giovanni Dicanio. Welcome back to this module on types and variables in this course on modern C++11 from Scratch. So we are at the beginning of this C++ journey, and in this module, I'll introduce you to the fundamental concepts of types and variables that will be used throughout this whole course in the following modules. I mean, types and variables are really fundamental ingredients when writing code. After completing this module, you'll have a practical understanding of variables and common types in C++. So let's start this part of this C++ journey together. Well, here's how we'll get this done. First, I'll introduce you to the concept of a variable, what is a variable, and to the associated concept of a type. I'll introduce you common fundamental C++ types like int and the double and the basic operations that may be performed with those. You'll also learn how to represent and manipulate text in your C++ code using the standard std::string class. And finally, you'll learn about the constants in C++. I'll show you several demos throughout this module to show practical applications of the concepts discussed using the slides. So there's lots of exciting and interesting stuff ahead. Let's start with an introduction to variables in the next clip.
Reusing Code with Functions Hi. This is Giovanni Dicanio. Welcome back to this module on functions in this course on modern C++11 from Scratch. So in previous modules, you learned how to use variables in your C++ code and how to implement decision logic and iterations as well. Well, you can build interesting algorithms with these ingredients discussed so far. So now, the time has arrived to learn how to reuse the course C++ code that you write. In other words, it's the time to introduce the concept of functions, in particular, in this module, you'll learn how to define and implement your own functions. So this is how we get this done. First, I'll introduce you to the concept of functions and why functions are important. You'll also see how to write your own functions in C++. You'll learn the required syntax. Throughout this module, you'll see concrete practical C++ code samples of functions in action. You'll also learn the important C++ basic rules of parameter passing. I'll also briefly introduce you to a new C++11 syntax, the so-called trailing return types that you may encounter during your C++ programming. So there's lots of interesting stuff ahead. Let's start with an introduction to functions in the next clip.
Storing Sequences of Items with the STL vector Hi. This is Giovanni Dicanio. Welcome back to this module introducing the standard libraries vector in this course on Modern C++11 from Scratch. So you reached a good point in this C++11 journey. You know how to use variables in your code, how to implement decision logic and iterations, and even how to define your own custom functions. Now I think it's the time to introduce you to a very powerful and efficient C++ standard container, that is a tool that you'll use a lot in your own C++ code to store items. So in this module, you'll learn about this standard vector container. After completing this module, you'll have a basic and practical understanding of how to use a standard vector container, how to store data in a standard vector, and you'll learn some basic and useful vector operations as well. So let's start this interesting part of this C++ journey together. Well, here's how we'll get this done. First, I'll introduce you to the standard vector container class and to its basic operations like adding elements to vectors, or iterating through vector's content, and so on. I'll also show you some C++ demo code to teach you how to load some content from files into a vector. You'll also learn how to sort the content of a vector. This will be a good occasion to introduce you to the C++ standard libraries algorithms that will come in handy in your future C++ programming. So there's lots of exciting and interesting stuff ahead. Let's start with a basic introduction to this standard vector container in the next clip.
Defining Custom Types Hi. This is Giovanni Dicanio. Welcome back to this module on defining custom types in this course on modern C++11 from Scratch. Well, if you think of the C++ code I showed you so far in all the previous modules, there was common characteristics throughout. That code was built using either fundamental types like integers or using some other types defined in the C++ under library like std::string, types that other programmers built for us. So we just use the prebuilt types throughout the previous modules, but wouldn't it be cool if you could define your own types. Well in this module, I'll teach you how to do that. After completing this module, you'll have a better practical understanding of how to build your own custom types defining your own classes in C++. So let's start this very interesting part of this C++ journey together. Well here's how we'll get this done. First, you'll learn the concept of a class in C++. I'll show you a concrete and a simple example of defining a custom class, which will be a simple rectangle class. Although conceptually simple, building this rectangle class will give us an occasion to introduce fundamental concept associated to C++ classes. For example, you'll learn about data members, member functions, also known as methods, you'll also learn about a couple of fundamental access levels for C++ classes, public and private. I'll introduce you to the concept of constructors to initialize object. And finally, you'll learn about destructors and automatic resource management in C++. I'll show you all these concepts in action in some C++ demo code as well. So let's start talking about defining custom types in the next clip.
Organizing Code in Multiple Files Hi. This is Giovanni Dicanio. Welcome back to this module on organizing code in multiple files in this course on modern C++11 from Scratch. So we are at the end of this C++ journey. We've come a long way from your first hello world C++ program at the beginning to defining your own custom C++ classes in the previous module. Now I'd like to wrap up this course showing you how to organize your C++ code in multiple files. If you think about it, throughout all these modules, the C++ code I showed you in each demo was contained in just a single source file. For simple C++ demo code, this works fine. However, this approach doesn't scale up well in more complex real world projects. In such projects, the source code is actually split in several often many files. So in this module, you'll learn how to split your code in multiple files. So here's how we'll get this done. First, I'll teach you how to split a single file source code extracting a class definition and moving it into a real subtle header-only file. Then I show you how to further split the code describing the class into a header file and a source implementation file. And finally, I'll also introduce you to the important CMake, open source, and cross platform build system. So let's start discussing the code reuse with header files in the next clip.