关于map

灌水区

或者,map.find的正确用法
by MW狼王 @ 2019-12-14 12:22:37


求助
by MW狼王 @ 2019-12-14 12:22:44


@[Rem°](/user/80358) 谢谢
by MW狼王 @ 2019-12-14 12:27:00


@[Rem°](/user/80358) 请问我是否可以继续填写一下函数 ``` string str1; cin>>str1; int x1=Map1.find(str1); ```
by MW狼王 @ 2019-12-14 12:27:53


@[Rem°](/user/80358) 请问这样做是可以的吗
by MW狼王 @ 2019-12-14 12:28:09


@[MW狼王](/user/101153) 等等看错了,应该是 int
by Rbu_nas @ 2019-12-14 12:28:31


@[MW狼王](/user/101153) find() 返回的是指针
by Rbu_nas @ 2019-12-14 12:29:02


@[Rem°](/user/80358) 但是您看我的程序 ![](https://cdn.luogu.com.cn/upload/image_hosting/yk8h0nb1.png) 显示出我的编译如下: ![](https://cdn.luogu.com.cn/upload/image_hosting/zf72oypq.png)
by MW狼王 @ 2019-12-14 12:33:00


@[MW狼王](/user/101153) int,可以理解int为下标,string为值
by qsmoonzh @ 2019-12-14 12:41:31


@[MW狼王](/user/101153) find返回的是迭代器啊
by qsmoonzh @ 2019-12-14 12:42:30


| 下一页