C++ Advanced Topics

Learn to write modern C++: expressive, readable, fast, and secure code that’s just more fun than the old way.
Course info
Rating
(487)
Level
Advanced
Updated
Mar 8, 2012
Duration
5h 45m
Table of contents
Avoid Manual Memory Management
Use Lambdas
Use Standard Containers
Use Standard Algorithms
Embrace Move Semantics
Follow Style Rules
Consider the PImpl Idiom
Stop Writing C With Classes
Description
Course info
Rating
(487)
Level
Advanced
Updated
Mar 8, 2012
Duration
5h 45m
Description

Once you know the basic of C++ syntax and what the Standard Library offers you, it’s time to establish whether you’re writing good code or not. Modern C++ is expressive, readable, fast, and secure. In most cases the faster thing to do is also the easier thing to do and the safer thing to do – no tradeoffs! In this course you’ll draw on your C++ Fundamentals knowledge to explore a number of ways to ensure your applications are implemented in Modern C++, not C-With-Classes or other old-style idioms. You’ll take advantage of the Standard Library and write code that is future proof and safe.

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
C++ Fundamentals Including C++ 17
Beginner
5h 48m
6 Mar 2018
Beautiful C++: STL Algorithms
Intermediate
4h 24m
30 Jun 2016
More courses by Kate Gregory
Section Introduction Transcripts
Section Introduction Transcripts

Avoid Manual Memory Management
Kate Gregory: Hi. Welcome to Advanced C++ and Best Practices. My name is Kate Gregory, and I've been C++ for over 20 years. When I started Microsoft didn't even have a C++ compiler. You know, I've seen a lot of changes in that time, and there's a clear difference between the kind of C++ we wrote when the language was young and the kind we write today. Features have been added to the language, libraries have been written, and we've all learned a lot about readability and maintainability. And that's what I want to show you, how to write safe, readable, modern C++.

Use Lambdas
Welcome back to advanced C Plus Plus and best practices. My name is Kate Gregory and I'm showing you some ways to get the most out of C Plus Plus and write it in a modern style. In this module, I want to show why lambdas are really at the heart of that modern C Plus Plus style of writing. They make things simple that were always possible, but that we didn't do and they make some really exciting things a lot more possible than they ever were. I'll also give you some guidance about writing lambdas. ( Pause )

Use Standard Containers
Hi. Welcome back to advanced C++ and best practices. My name is Kate Gregory, and I'm showing you some ways to get the most out of C++ and write in a modern style. In this module I wanted to revisit the container classes that we discussed in the fundamentals course. There's two things about the containers you need to know above and beyond just plain how to use them in a simple demo. Using containers means writing less code which is always a good thing, and using containers means that your code is safer, type safe, exception safe, won't memory leak. Let me show you. ( Pause )

Use Standard Algorithms
Hi. Welcome back to Advanced C Plus Plus and Best Practices. My name is Kate Gregory, and I'm showing you some ways to get the most out of C plus plus and write in a modern style. In this module, I want to address the use of algorithms from the standard library. You've seen me using a number of them. The existence of these algorithms are why the standard collections are so useful. I really want to go into some of the details to make it clear why this is the right way to write your C plus plus code today.

Embrace Move Semantics
Hi. Welcome back to advanced C++ and best practices. My name is Kate Gregory and I'm showing you some ways to get the most out of C++ and right in a modern style. In this module, it's time to explore move semantics. I've referred to this in passing in a lot of other modules. I really want to drill in now. This is something new in C++ 11 and it can produce major performance improvements for your application. Perhaps you've heard a sentence like, "Standard containers leverage move semantics. " In this module, you'll learn what that means and why it matters.

Follow Style Rules
Hi! Welcome back to advanced C++ and best practices. My name is Kate Gregory and I'm showing you some ways to get the most out of C++ and write in a modern style. In this module, I've just gathered up some pieces of advice. They are smaller than used lambdas but they're still important. You know, it's all about making sure your code expresses your intent to the people who read it. After all, the developer you helped might just be the future you.

Consider the PImpl Idiom
Hi! Welcome back to Advance C++ and Best Practices. My name is Kate Gregory and I'm showing you some ways to get the most out of C++ and write in modern style. In this module, I want to introduce you to a useful idiom that has a truly ugly name. You may have already known that C++ folks are not the best at naming things. But despite its name, this idiom solves a real problem for many C++ developers. It's been around for a long time but I'm going to present an updated version that uses some C++ 11 features. If you can follow this, you're definitely a modern C++ developer.

Stop Writing C With Classes
Hi. Welcome back to Advanced C++ and Best Practices. My name is Kate Gregory. And I'm showing you some ways to get the most out of C++ and write in a modern style. In this module, I want to show you how to transform existing old school code into modern code. I trawled out on the internet and found all the old style, C with classes, kind of code that I could find. In fact there're not a lot of classes involved in it. And I want to show you how you'll bump across that kind of code and how changing it will make your applications easier to read and easier to maintain.