What is pair in C++…
 
Notifications
Clear all

What is pair in C++?

2 Posts
3 Users
0 Likes
189 Views
0
Topic starter

What is pair in C++?

2 Answers
0

In C++, a pair is a simple template class that allows you to store two values of potentially different data types together as a single entity.

0

A pair in C++ is described as a container that combines two elements of the same or different data types in C++. Pair in C++ consists of two elements, first and second (must be in this order), and they are accessed using the dot (.) operator and the keyword first or second.

Share: