C++ Pair

Subscribers:
50,600
Published on ● Video Link: https://www.youtube.com/watch?v=FfJcYL-wsoM



Duration: 0:00
280 views
14


Pairs in C++. In this video you will learn about pairs in c++. A pair is a collection that holds two values, which can be of the same or different type (heterogenous types). For instance, you can create a pair that holds a string and an int. Pairs are useful if you only need to group two values together as a single unit, which you can then store in another collection such as a vector. In this tutorial, you will learn how to create a pair using the constructor or make_pair function, how to access the first and second element, and how to pack and unpack a pair.

C++ Playlist:
   • C++ Tutorial  

Install C++ with VS Code:
   • How to set up C++ in Visual Studio Code  

Subscribe for more coding tutorials 😄!