C++ Fundamentals

C++ Fundamentals is designed to give you everything you need to become a productive C++ developer
Course info
Rating
(1798)
Level
Beginner
Updated
Sep 13, 2011
Duration
7h 3m
Table of contents
Context
Tools
Language Basics - Variables: Fundamental Types
Variables - User Defined Types
Flow of Control
Operators
Templates
Pointers
Pointers and Inheritance
Description
Course info
Rating
(1798)
Level
Beginner
Updated
Sep 13, 2011
Duration
7h 3m
Description

C++ is a general purpose programming language that is used by millions of developers. It offers a powerful combination of performance and abstraction that other languages don’t have. You can use C++ to write different kinds of applications for a variety of platforms. In this course, I’ll cover basics of language syntax – declaring variables, classes, building expressions using operators and functions – and work up to templates, pointers, const, and polymorphism. I’ll be using the principles of “modern C++” as much as possible, relying on the Standard Library and using idioms like Resource Acquisition is Initialization to reduce the effort involved in memory management. Some people are scared of C++, but I’ll show you how to approach the language without fear.

About the author
About the author

Kate Gregory is in her fourth decade of being paid to program. Her firm, Gregory Consulting Limited, is based in rural Ontario and helps clients adopt new technologies and adjust to the changing business environment. Current work makes heavy use of .NET and Visual C++ for both web and client development, especially for Windows 7 and 8. Managing, mentoring, technical writing, and technical speaking occupy much of her time, but she still writes code every week.

More from the author
Beautiful C++: Updating Legacy Code
Intermediate
5h 2m
Nov 19, 2018
C++ Fundamentals Including C++ 17
Beginner
5h 48m
Mar 6, 2018
More courses by Kate Gregory
Section Introduction Transcripts
Section Introduction Transcripts

Context
Welcome to Introduction to C++. My name is Kate Gregory, and I'd like to introduce myself by telling people I've been using C++ since before Microsoft had a C++ compiler. That's well over 20 years, and, in that time, I've seen a lot of changes to the language and to how people use it. You know if you did a course in college 10 or 20 years where you know somebody who did, and they told you about it, you might not recognize the C++ I'm going to show you. I'm going to teach you the basics you need to write good C++. It's the most popular general-purpose programming language ever and one that's still relevant and useful today. To get started in this module, I'm going to tell you some of the advantages of C++ and why so many developers are using it. You'll also see what C++ CLI is, what C++ OX is, and start to learn what Modern C++ is, and why it's the way to write C++ this century, and then you'll be ready to start writing some code.

Tools
Welcome back to Introduction to C++. My name is Kate Gregory and I am introducing you to the most popular general purpose programming language, C++. In this module, I will show you the tools you need to get started, they are free, and how to use them a little bit. And I will start to introduce some C++ syntax and get you familiar with how the code looks.

Language Basics - Variables: Fundamental Types
Welcome back to Introduction to C++. My name is Kate Gregory and I'm introducing you to the most popular general purpose programming language C++. In this module, I'll begin a discussion of variables by talking about fundamental types and showing you how to work with variables of different types. One of my favorite sayings is the compiler is your friend and I'm going to show you how the complier can save you from mistakes that you might not have spotted yourself.

Variables - User Defined Types
Welcome back to Introduction to C++. My name is Kate Gregory and I'm introducing you to the most popular general purpose programming language C++. In this module, I'll build on the concepts you met with fundamental types and use them for user defined types, your own classes. So you'll see how to define and use objects that are instances of class that you invented. That will need us to talk about some other concepts that are really important to C++ like scope, the lifetime of an object, and we also need to discuss inheritance, namespaces, the C++ enum type, and the role of the preprocessor in a C++ application. It's quite a lot of ground to cover, but at the end of it, you'll be really ready to work with objects with instances of your own classes or classes from a library.

Flow of Control
Welcome back to Introduction to C++. My name is Kate Gregory and I'm introducing you to the most popular general purpose Programming Language C++. In this module, you'll really see how to build a program using loops, conditionals, those other flow of control statements that essentially all programming languages have. Some of the C++ ones aren't as well known as things that are common in other languages. I have some lightning quick demos that don't really do anything useful, but they show how all these constructs work. This is also a good time to start to talk about functions, the real building blocks of just about every application. In C++ we have both free functions and member function, I'll show you them both and show you the difference.

Operators
Welcome back to Introduction to C++. My name is Kate Gregory and I'm introducing you to the most popular general purpose programming language, C++. In this module you'll meet the rather amazing number of operators that C++ has for performing arithmetic, comparing, and so on. There are some pitfalls waiting for you and I'll show you what often trips up beginners to C++. You'll also learn how your own classes can get in on the operator story by writing your own overloads of common operators for your code.

Templates
Welcome back to Introduction to C++. My name is Kate Gregory and I'm introducing you to the most popular general purpose programming language, C++. In this module you'll learn about templates. Templates in C++ are similar to generics in other languages, but different in some very important ways. When you first get started in C++ you can use templates right from the very beginning. In fact, sometimes you use them without even knowing it. It's less common to write them. I'm going to show you how to write them, but just so we have some simple templates we can use in the demos. Understanding how they work takes the magic factor out of using them and I want you to know what a powerful technique templates are in C++.

Pointers
Welcome back to Introduction to C++. My name is Kate Gregory and I'm introducing you to the most popular general purpose programming language, C++. In this module it's time to finally tackle the most scary part of C++, pointers. Now you've seen you can write useful and powerful C++ applications without pointers. We've written a lot of code and covered a lot of ground in a completely pointer-free way. In fact, if you have pointers or difficult stories from other people or memories of your own, you know they're based on how C++ used to be written. That said, it is time to see what pointers are, what they're for, how you can have long-lived objects in your applications, and why it's not as bad as people have told you. This is also the place to discuss references and the const keyword, so let's get started.

Pointers and Inheritance
Welcome back to Introduction to C++. My name is Kate Gregory and I'm introducing you to the most popular general purpose programming language, C++. In this module I'll talk about polymorphism in C++. Now, polymorphism doesn't sneak up on you. It can only happen when you have classes that inherit from other classes and new pointers. It's actually an incredibly useful and productive technique. When you get to talk about polymorphism and pointers to objects and base classes and drive classes you have other pieces of vocabulary like, virtual, slicing, casting. You know, to really get the C++ pointers story you need to explore what happens with pointers to objects that are part of an inheritance hierarchy, so let's do that.