中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁(yè) > news >正文

怎樣做音視頻宣傳網(wǎng)站正規(guī)網(wǎng)站建設(shè)公司

怎樣做音視頻宣傳網(wǎng)站,正規(guī)網(wǎng)站建設(shè)公司,服務(wù)器不支持做網(wǎng)站是什么意思,做網(wǎng)站手把手1、標(biāo)準(zhǔn)庫(kù)的map類(lèi)型 2、插入數(shù)據(jù) #include <map> #include <string> #include <iostream>using namespace std;int main() {map<string, int> mapTest;// 插入到map容器內(nèi)部的元素是默認(rèn)按照key從小到大來(lái)排序// key類(lèi)型一定要重載小于號(hào)<運(yùn)算符map…

1、標(biāo)準(zhǔn)庫(kù)的map類(lèi)型

2、插入數(shù)據(jù)

#include <map>
#include <string>
#include <iostream>using namespace std;int main() {map<string, int> mapTest;// 插入到map容器內(nèi)部的元素是默認(rèn)按照key從小到大來(lái)排序// key類(lèi)型一定要重載小于號(hào)<運(yùn)算符mapTest["aaa"] = 100;  // int& operator[](const string& index);mapTest["eee"] = 500;  // 可以重新賦值,但是下面的用insert方法就不能重新賦值mapTest.insert(map<string, int>::value_type("bbb", 200));mapTest.insert(map<string, int>::value_type("bbb", 2000));mapTest.insert(pair<string, int>("ccc", 300));mapTest.insert(pair<string, int>("ccc", 3000));mapTest.insert(make_pair("ddd", 400));mapTest.insert(make_pair("ddd", 4000));map<string, int>::const_iterator it;for (it = mapTest.begin(); it != mapTest.end(); ++it){cout << it->first << " " << it->second << endl;}return 0;
}// 輸出
aaa 100
bbb 200
ccc 300
ddd 400
eee 500

3、查找與修改

#include <map>
#include <string>
#include <iostream>using namespace std;int main() {map<string, int> mapTest;mapTest["aaa"] = 100;  // int& operator[](const string& index);mapTest.insert(map<string, int>::value_type("bbb", 200));mapTest.insert(pair<string, int>("ccc", 300));mapTest.insert(make_pair("ddd", 400));int n = mapTest["bbbc"];  // 這邊如果找不到ket的值,還是會(huì)返回0,這樣就不能判斷有沒(méi)有找到。所以得用限免的方式去查找cout << n << endl;mapTest["bbb"] = 2000;map<string, int>::iterator it;it = mapTest.find("ccc");if (it != mapTest.end()){it->second = 3000;}else{cout << "not found" << endl;}//    map<string, int>::const_iterator it;for (it = mapTest.begin(); it != mapTest.end(); ++it){cout << it->first << " " << it->second << endl;}return 0;
}// 輸出
0
aaa 100
bbb 2000
bbbc 0
ccc 3000
ddd 400

4、刪除

#include <map>
#include <string>
#include <iostream>using namespace std;int main() {map<string, int> mapTest;// 插入到map容器內(nèi)部的元素是默認(rèn)按照key從小到大來(lái)排序// key類(lèi)型一定要重載小于號(hào)<運(yùn)算符mapTest["aaa"] = 100;  // int& operator[](const string& index);mapTest.insert(map<string, int>::value_type("bbb", 200));mapTest.insert(pair<string, int>("ccc", 300));mapTest.insert(make_pair("ddd", 400));mapTest.erase("bbb");map<string, int>::const_iterator it;it = mapTest.find("ccc");if (it != mapTest.end()){mapTest.erase(it);}for (it = mapTest.begin(); it != mapTest.end(); ++it){cout << it->first << " " << it->second << endl;}return 0;
}// 輸出
aaa 100
ddd 400

http://www.risenshineclean.com/news/5536.html

相關(guān)文章:

  • 上海商城網(wǎng)站站內(nèi)免費(fèi)推廣有哪些
  • java做網(wǎng)站的要求推廣普通話的意義50字
  • 手機(jī)開(kāi)發(fā)網(wǎng)站教程如何做好一個(gè)品牌推廣
  • 尉氏做網(wǎng)站網(wǎng)絡(luò)營(yíng)銷(xiāo)logo
  • 網(wǎng)站建設(shè)全網(wǎng)推廣網(wǎng)絡(luò)seo優(yōu)化
  • 區(qū)塊鏈開(kāi)發(fā)書(shū)籍推薦搜索引擎優(yōu)化課程
  • 高新區(qū)網(wǎng)站建設(shè)的建議免費(fèi)網(wǎng)上申請(qǐng)注冊(cè)
  • 深圳做小程序的公司排名關(guān)鍵詞seo排名怎么做的
  • 網(wǎng)站維護(hù)與建設(shè)內(nèi)容公司網(wǎng)站設(shè)計(jì)圖
  • 高端網(wǎng)站開(kāi)發(fā)找哪家好企業(yè)官方網(wǎng)站怎么申請(qǐng)
  • title 鎮(zhèn)江網(wǎng)站建設(shè)免費(fèi)推廣軟件
  • 鐘表珠寶商城網(wǎng)站建設(shè)百度經(jīng)驗(yàn)官網(wǎng)
  • 惠州網(wǎng)站建設(shè)學(xué)校百度學(xué)術(shù)論文官網(wǎng)入口
  • 網(wǎng)站開(kāi)發(fā)文檔包括長(zhǎng)春網(wǎng)站建設(shè)方案咨詢(xún)
  • 江蘇省建設(shè)廳網(wǎng)站施工員證查詢(xún)營(yíng)銷(xiāo)比較好的知名公司有哪些
  • 免費(fèi)php網(wǎng)站源碼信息流推廣渠道有哪些
  • 網(wǎng)站建設(shè)中 模版模板建站哪里有
  • 網(wǎng)站做任務(wù)賺錢(qián)優(yōu)化設(shè)計(jì)六年級(jí)下冊(cè)語(yǔ)文答案
  • 淄博團(tuán)購(gòu)網(wǎng)站建設(shè)紋身網(wǎng)站設(shè)計(jì)
  • 旅游酒店網(wǎng)站建設(shè)公司網(wǎng)站建設(shè)多少錢(qián)
  • 本地建設(shè)網(wǎng)站寧波網(wǎng)站制作優(yōu)化服務(wù)
  • 怎么用ps切片在dw里做網(wǎng)站百度收錄時(shí)間
  • 家具網(wǎng)站模板百度客戶(hù)電話
  • 做服裝加工哪個(gè)網(wǎng)站比較好溫州seo推廣外包
  • 黑龍江進(jìn)入疫情緊急狀態(tài)seo需要什么技術(shù)
  • 外包公司做的網(wǎng)站怎么改密碼站長(zhǎng)之家app下載
  • 1688網(wǎng)站上自己做模版專(zhuān)業(yè)營(yíng)銷(xiāo)團(tuán)隊(duì)公司
  • 阿里云網(wǎng)站如何建設(shè)視頻新浪微博指數(shù)查詢(xún)
  • 快速 模板 做網(wǎng)站百度網(wǎng)址安全檢測(cè)
  • 焦作市住房和城鄉(xiāng)建設(shè)局網(wǎng)站百度競(jìng)價(jià)推廣登陸