C++ is one of the most widely used programming languages. Fast, efficient, and flexible, it is used to solve many problems. In particular, it is the Standard Template Library (STL) that gives C++ its power. In this course, we show you how.
C++ is one of the most widely used programming languages. Fast, efficient, and flexible, it is used to solve many problems. In particular, it is the Standard Template Library (STL) that gives C++ its power. In this course, we show you how.
Using real-world examples, we focus on how STL handles and manipulates data. We examine containers and iterators, and how data can be transformed into meaningful information using algorithms. There is coverage of I/O streams, strings and numerical methods, and how performance can be optimized through careful consideration of memory allocation and manipulation. We also demonstrate how multitasking and shared data is handled through concurrency and parallelism classes and utilities.
By the end of the course, you will understand the newer aspects of C++ STL and will be able to overcome tasks that are time-consuming or would break your stride while developing.
About the Author
James Slocum has been a professional developer for over 10 years. He graduated from NJIT with a Bachelor's degree in Computer Engineering in 2008, and again with a Master's in Computer Science in 2011. He currently works for Audible as a software engineer and tech lead for the library group. The languages he uses the most are Java, JavaScript, C++, and Dart. In his free time, he enjoys learning about new languages and technology.
This video will give you an overview about the course.
The goal of this video is to bring the user up to speed with what the STL has to offer at a high level, so, we can begin to learn about it in the coming sections. It also serves as a reminder of how C++ templates work.
• Learn about the different high-level features of the STL
• Cover C++ Templates
• Perform the examples
This video aims to ease the user into the power of STL, by introducing some general concepts and utilities. We cover the headers that we will include, and the std:: namespace. We also refresh the user on C++ exception handling, and introduce the new C++11 unique_ptr class for handling memory.
• Learn about the different headers and the standard namespace
• Go through the C++ exception handling example
• Go through the unique_ptr example
This video aims to introduce the user to some common STL utilities, which includes strings and IO.
• Learn which utilities are available
• Go through the C++ strings example
• This video aims to introduce the user to some common STL ‘utilities’, which includes strings and IO
This video aims to include regular expressions.
• Go through the C++ regex example
The aim of this video is to tie all of what we have learned together, using a project. Our project is a Bitcoin exchange rate program, that will fetch the latest exchange rates for multiple currencies.
• We need to gather the necessary libraries, and begin our project
• Get our project to a working state by going through the example
• Wrap up the example with proper exception handling
This is the second part of the project where you will be doing coding.
• Open bitcoin.cpp file
• Create a class called CurlHandler
• Compile the project
This is the third part of the project.
• Create custom writer function as data handler
• Make changes in the bitcoin class
• Compile the project
The aim of this video is to remind the user of all of the topics covered, and note down what we will be talking about in the next section.
• Give a quick reminder of what we have learned until now
• Cover the material discussed during the section
• Learn what is coming in the next section
The user is unfamiliar with what containers are available and how they are used.
• Begin by introducing the user to the different categories of containers
• Familiarize the user with the abilities that each container has at a high level
• Prepare the user to go deeper into containers in the subsequent videos
The user is unfamiliar with the vector container, wishes to know more about them, and when to use them.
• Begin by introducing the user to the vector, discussing how it works
• Inform the user of the pros and cons of using the data structure
• Finish up with a code example, showing its general usage
The user is unfamiliar with the standard array container, wishes to know more about them, and when to use them in contrast to the C style array.
• Begin by introducing the user to the standard array, discussing how it works
• Inform the user of the pros and cons to using the data structure
• Finish up with a code example showing its general usage
The user is unfamiliar with the list container, wishes to know more about them, and when to use them.
• Begin by introducing the user to the list, discussing how it works
• Inform the user of the pros and cons of using the data structure
• Finish up with a code example, showing its general usage
The user is unfamiliar with the deque container, the adapter containers that wrap it, wishes to know more about them, and when to use them.
• Begin by introducing the user to the deque container, discussing how it works
• Then break down the different adapters (stack and queue)
• Finish up with a code example, showing their general usage
The user is unfamiliar with the maps and multimaps containers, wishes to know more about them, and when to use them.
• Begin by introducing the user to the map, discussing how it works
• Show what it is used for, and how it differs from the multimaps
• Prepare the user to go deeper into maps and multimaps coding in the subsequent videos
The user is unfamiliar with the maps coding, wishes to know more about them, and when to use them.
• Include the map package and introduce a simple example of map coding
• Show a complex maps coding and display elements
• Show a complex maps coding to remove elements from the existing code
The user is unfamiliar with the multimaps coding and wishes to know more about them, and when to use them.
• Implement multimap to track line number in the text
• Printout word keys and the position of all the word keys
The user is unfamiliar with the multimaps coding and wishes to know more about them, and when to use them.
• Begin by introducing the user to the set, discussing how it works
• Show what it is used for and how it differs from the multiset
The user now wishes to apply their gained knowledge and implement a container of their own.
• Introduce our project idea, and explain the functionality we are trying to implement
• Implement the container in a long code example
• Finish up with a code example, showing the general usage of our new containers
We have learned a lot of information and we wish to review and get ready for the next section.
• Discuss what we have covered until now
• Discuss what we will cover in the coming sections
• Lead into the next section
We need to get up to speed on what iterators are and what they can do.
• Cover the basics of iterators and set the ground work for what they are used for
• Show the technical elements of the iterator and start learning about iterator traits
• Go through an example, showing how to access an existing iterator iterator_traits
We want to learn what makes up an input iterator, and how to use it.
• Learn what an input iterator can do
• Learn what it takes to fulfill an input iterator contract
• Go through a code example, showing how to use input iterators
We want to learn what makes up an output iterator, and how to use it.
• Learn what an output iterator can do
• Learn what it takes to fulfill an output iterator contract
• Go through a code example, showing how to use output iterators
We want to learn what makes up a forward iterator, and how to use it.
• Learn what a forward iterator can do
• Learn what it takes to fulfill a forward iterator contract
• Go through a code example, showing how to use forward iterators
We want to learn what makes up a bidirectional iterator, and how to use it.
• Learn what a bidirectional iterator can do
• Learn what it takes to fulfill a bidirectional iterator contract
• Go through a code example, showing how to use bidirectional iterators
We want to learn what makes up a random access iterator, and how to use it.
• Learn what a random access iterator can do
• Learn what it takes to fulfill a random access iterator contract
• Go through a code example, showing how to use random access iterators
We want to know what functions are available for making working with iterators simpler.
• Learn what functions are available to make working with iterators more generic
• Learn what these different functions can do
• Show them in action using a code example
We want to learn what other non-container iterators are available, and what they can do.
• Introduce the different adapter iterator types
• Learn what they can do and cover the differences
• Show them in action using a code example
We want to learn how to leverage iterators to write generic functions, that work on a large variety of different things.
• Discuss the pros of using iterators
• Introduce the idea of generic functions (that is, the core of STL)
• Create our own generic copy function using templates and iterators
We want to learn how to make our own iterator.
• Discuss the different ways to implement an iterator
• Talk about how there is an old way and a new way
• Implement our own iterator using the newest method
We want to apply what we have learned and expand on our project from section two.
• We want to apply what we have learned
• Implement a circular buffer iterator for our section two project
• Implement a test program to verify its functionality
We want to review what we have covered in this section, and see what will be there in the following sections.
• We want to review what we covered
• Go over the covered topics
• Talk about whats coming up in the next section
In this video, we shall cover the role of algorithms, also describing some of their limitations.
• The user is unfamiliar with algorithms and they need to get up to speed with this
• Show them the different types of algorithms available
• Explain the different overall components of algorithms and how they behave
The listener is new to algorithms and does not know about the for_each sequence algorithm.
• Introduce the user to the different types of modifying and non-modifying algorithms
• Introduce the for_each algorithm
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the equals sequence algorithm.
• Introduce the listener to the equals algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the copying algorithms.
• Introduce the listener to the std::copy algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the moving algorithms.
• Introduce the listener to the std::move algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the removing algorithms.
• Introduce the listener to the std::remove algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the sorting algorithms.
• Introduce the listener to the std::sort algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the partial_sort algorithms.
• Introduce the listener to the std::partial_sort algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the partitioning algorithms.
• Introduce the listener to the std::partition algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the partition_copy algorithms.
• Introduce the listener to the std::partition_copy algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the finding algorithms.
• Introduce the listener to the std::find algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the misc finding algorithms.
• Introduce the listener to the std::find_first_of, std::adjacent_find algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the search algorithms.
• Introduce the listener to the std::search algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the binary search algorithms.
• Introduce the listener to the std::binary_search algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the counting algorithms.
• Introduce the listener to the std::count algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the replacement algorithms.
• Introduce the listener to the std::replace algorithms
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the replace_copy algorithms.
• Introduce the listener to the std::replace_copy algorithms
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the transform algorithms.
• Introduce the listener to the std::transform algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the swapping algorithms.
• Introduce the listener to the std::swap algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the rotating algorithms.
• Introduce the listener to the std::rotate algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the shuffling algorithms.
• Introduce the listener to the std::shuffle algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the permutation algorithms.
• Introduce the listener to the std::is_permutation, std::next_permutation, and std::prev_permutation algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the sampling algorithms.
• Introduce the listener to the std::sample algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the min algorithms.
• Introduce the listener to the std::min and std::min_element algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the max algorithms.
• Introduce the listener to the std::max, and std::max_element algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the clamping algorithms.
• Introduce the listener to the std::clamp algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the fill and generate algorithms.
• Introduce the listener to the std::fill and std::generate algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the numeric algorithms.
• Introduce the listener to the std::accumulate algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the numeric algorithms.
• Introduce the listener to the std::partial_sum and std::adjacent_difference algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the numeric algorithms.
• Introduce the listener to the std::gcd, and std::lcm algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
The listener is new to algorithms and does not know about the numeric algorithms.
• Introduce the listener to the std::inner_product, and std::iota algorithm
• Show how it works and explain the different versions available
• Reinforce the lesson with a code example
Review the entire section until now
• Review the topics covered
• Talk about lessons learned
• Introduce the next topic that we will cover
The user is unfamiliar with I/O in the STL.
• Introduce the basic classes and overview of I/O
• Talk about how it is an extensible framework
• Set up for the next section dealing with Console I/O
The user wants to be able to interact with a user from the console.
• Introduce the user to the console
• Talk about the standard I/O
• Present an example program that uses these concepts
The user wants to be able to read input from the user onto a console.
• Introduce the concept of std: :cin
• Present an example program that uses these concepts
In this video, you will learn about file I/O.
• Introduce the file I/O operations
• Talk about the modes in which a file can be opened
• Present an example program that uses these concepts
In this video, you will learn about string Streams.
• Introduce the concept of String Streams
• Present an example program that uses these concepts
In this video, you will learn about Stream Manipulators and Formatters.
• Introduce the different manipulators
• Introduce the different formatters
• Present an example program that uses these concepts
In this video, you will learn about Stream States.
• Introduce the concept of Stream States
• See the different stream states that a stream can be in
• Present an example program that uses these concepts
In this video, you will learn about low level I/O.
• Introduce the concept of low level I/O
• See the different read functions in low level I/O
• Present an example program that uses these concepts
In this video, you will learn about Overloading Stream Operators.
• Introduce the concept of Stream Operators
• Present an example program that uses these concepts
In this video, we want to tie all of these concepts together and see it running.
• Get an overview of the project we are going to build
• See how the project is going to be divided into 3 parts
• Build the project
In this video, we will see the second part of our project.
• Create the classes and structures for our project activities
• Present an example program that uses these concepts
In this video, we will see the third part of our project.
• Implement the View portion to display our portion to the user
• Present an example program that uses these concepts
We want to know what we covered.
• Go over the information that we have covered in this section
• We want to know what we covered
The user is unfamiliar with the unique_ptr and wants to learn more about it.
• Introduce the unique_ptr
• Show what it can do, and how to use it
• Reinforce the lesson with an example
The user is unfamiliar with the shared_ptr and wants to learn more about it.
• Introduce the shared_ptr and weak_ptr
• Show what it can do, and how to use it
• Reinforce the lesson with an example
The user is unfamiliar with the std::allocator and wants to learn more about it.
• Introduce the std::allocator
• Show what it can do, and how to use it
• Reinforce the lesson with an example
The user would like to know how to implement their own allocator.
• Talk about what is expected of an allocator
• Define a minimal allocator
• Reinforce the lesson with an example
The user would like to know about how to handle uninitialized memory blocks in C++ .
• Talk about how to create uninitialized blocks of memory
• Show the STL functions to work with it.
• Reinforce the lesson with an example
We want to quickly remind the user everything we covered in this section.
• Review the topics covered
• Talk about a few lessons learned
• Introduce the next topic that we will cover
The user is new to the idea of threads and needs to be introduced to it.
• Review single threaded architecture
• Introduce threads and how they work
• Describe how we will use them in C++ going forward
The user wants to create threads to do multiple simultaneous tasks.
• Review what problems threads are good for
• Show how to create and use threads
• Show an example to reinforce the topics covered
The user wants to learn about locks to avoid race conditions.
• Introduce its basic concepts to the user
• Give an overview of how to use the new feature
• Show an example to reinforce the topics covered
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.