Essential C++ 筆記(3):泛型編程風格(下)

繼續更新Essential C++中第三章:泛型編程風格的後序內容。ios 七、使用Map   map被定義爲一對數值,key一般是字符串,扮演者索引的角色,另外一個數值是value。web #include<map> #include<string> map<string, int> words;   輸入key 和 value 的最簡單方式是:編程 words["vermeer"] = 1;
相關文章
相關標籤/搜索