map test
2024-08-31 08:13:59
// mapTest.cpp : Defines the entry point for the console application.
// #include "stdafx.h"
#include <map>
#include <string>
#include <iostream>
using namespace std; int main(int argc, char* argv[])
{
map<string,int> test;
test.insert(map<std::string,int> ::value_type("a",));
test.insert(map<std::string,int> ::value_type("b",));
map<string,int>::iterator it=test.begin();
for (;it!=test.end();it++)
{
cout<<it->first<<","<<it->second<<endl;
} int j=test["b"];
printf("%d\n",j);
return ;
}
/*
a,1
b,2
2
Press any key to continue
*/
最新文章
- 并发编程中.net与java的一些对比
- c读写文件
- 【转载】CSS规范
- Spring Boot 之 HelloWorld详解
- nginx指令
- solr安全-tomcat
- C#百万数据查询超时问题
- Vue2.0的变化 ,组件模板,生命周期,循环,自定义键盘指令,过滤器
- Linux如何查找处理文件名后包含空格的文件
- Linux(Ubuntu)使用日记------markdown文档转化为word文档
- Appium+Python3+iOS定位元素
- 网络编程基础【day10】:我是一个进程(三)
- web前端不可错过的开发工具–Adobe Brackets
- Python3基础 list + *运算 扩充列表
- socket-重叠模型(overlap)
- Percona Xtradb Cluster的设计与实现
- laravel 对接支付宝
- fusionjs 学习一 基本试用
- PyQt4 QListWidget 使用教程
- 【Leetcode 136】Single Number
热门文章
- C# 读取配置指定Config文件--亲测通过
- [转帖]深入理解latch: cache buffers chains
- ZYNQ笔记(4):PL触发中断
- python 笔记——生成器和迭代器
- Cglib 与 JDK动态代理
- asp.net core web的导入导出excel功能
- WebAPI 身份认证解决方案——Phenix.NET企业应用软件快速开发平台.使用指南.21.WebAPI服务(一)
- 在.Net Core中使用Swagger制作接口文档
- 安装和使用pyltp
- 查看Linux内核版本