当前位置:网站首页>pair类备注
pair类备注
2022-06-24 06:44:00 【雾散睛明】
pair类备注
pair 是记录一对数据
c++ 标准库
pair
first
second
pair::operator=
pair::swap
swap (pair)
get (pair)
示例:
// accessing pairs with get
#include <utility> // std::pair, std::get
#include <iostream> // std::cout
int main () {
std::pair <int,char> foo (10,'x');
std::get<0>(foo) = 50;
std::cout << "foo contains: ";
std::cout << std::get<0>(foo) << " and " << std::get<1>(foo) << '\n';
return 0;
}
更多详见 pair库
boost库
compressed_pair
和std::pair 使用差不多
边栏推荐
- Camera calibration (calibration purpose and principle)
- How to delete / select an input method on your computer
- [tips] use the deep learning toolbox of MATLAB deepnetworkdesigner to quickly design
- MFC multithreaded semaphore csemaphore critical area and mutually exclusive events
- [GUET-CTF2019]zips
- What is the mentality of spot gold worth learning from
- 选择器(>,~,+,[])
- Analog display of the module taking software verifies the correctness of the module taking data, and reversely converts the bin file of the lattice array to display
- How to connect the Bluetooth headset to the computer and how to connect the win10 computer to the Bluetooth headset
- PCL calculates the area of a polygon
猜你喜欢
【008】表格数据逐行筛选,跳出for循环及跳过本次循环思路_#VBA
The first common node of two linked lists_ The entry of the link in the linked list (Sword finger offer)
Buuctf misc grab from the doll
LeetCode 207:课程表(拓扑排序判断是否成环)
[image fusion] multi focus and multi spectral image fusion based on pixel saliency and wavelet transform with matlab code
Ultra wideband pulse positioning scheme, UWB precise positioning technology, wireless indoor positioning application
get_started_3dsctf_2016
When MFC uses the console, the project path cannot have spaces or Chinese, otherwise an error will be reported. Lnk1342 fails to save the backup copy of the binary file to be edited, etc
bjdctf_2020_babystack
MySQL - three tables (student, course, score) to query the name, number and score of students whose course is mathematics
随机推荐
《canvas》之第3章 曲线图形
Analog display of the module taking software verifies the correctness of the module taking data, and reversely converts the bin file of the lattice array to display
[MySQL usage Script] clone data tables, save query data to data tables, and create temporary tables
What industries and scenarios can the easynvr/easygbs/easycvr platform developed by tsingsee green rhino video be used in?
[WordPress website] 5 Set code highlight
PCL calculates the area of a polygon
Pyhton crawls to Adu (Li Yifeng) Weibo comments
Knowledge points of 2022 system integration project management engineer examination: ITSS information technology service
More than 60 million shovel excrement officials, can they hold a spring of domestic staple food?
《canvas》之第2章 直线图形
Deploy L2TP in VPN (Part 2)
MSSQL high permission injection write horse to Chinese path
[从零开始学习FPGA编程-41]:视野篇 - 摩尔时代与摩尔定律以及后摩尔时代的到来
[从零开始学习FPGA编程-42]:视野篇 - 后摩尔时代”芯片设计的技术演进-1-现状
Bjdctf 2020 Bar _ Babystack
6000多万铲屎官,捧得出一个国产主粮的春天吗?
The first common node of two linked lists_ The entry of the link in the linked list (Sword finger offer)
Camera calibration (calibration purpose and principle)
How to connect the Bluetooth headset to the computer and how to connect the win10 computer to the Bluetooth headset
Global and Chinese market of bed former 2022-2028: Research Report on technology, participants, trends, market size and share