📄 map.cpp
字号:
//map.cpp
//By phoenixinter
//On 11/23/2004
#include<iostream>
#include<map>
#include<string>
using namespace std;
int main()
{
/*type of the container:
*-map: elements key/value pairs
*-string: keys have type string
*-float: values have type float
*/
typedef map<string,float> StringFloatMap;
StringFloatMap col1;
//Remark:map允许你用operator []插入元素
col1["VAT"]=0.15;
col1["Pi"]=3.1415;
col1["an arbitrary number"]=4983.223;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -