日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

C++primer 10.6节练习

發(fā)布時間:2025/6/17 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 C++primer 10.6节练习 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

練習(xí)10.42

1 #include<iostream> 2 #include<string> 3 #include <iostream> 4 #include <string> 5 #include <vector> 6 #include <algorithm> 7 #include <list> 8 #include <functional> 9 #include <iterator> 10 #include <fstream> 11 using namespace std; 12 using namespace placeholders; 13 14 void elimDups(list<string> &words); 15 16 int main() 17 { 18 list<string> words{ "the","quick","red","fox","jumps","over","the","slow","red","turtle" }; 19 elimDups(words); 20 system("pause"); 21 return 0; 22 } 23 24 void elimDups(list<string>& words) 25 { 26 words.sort(); 27 words.unique(); 28 for (auto c : words) 29 cout << c << " "; 30 cout << endl; 31 }

?

轉(zhuǎn)載于:https://www.cnblogs.com/wuyinfenghappy/p/7365872.html

總結(jié)

以上是生活随笔為你收集整理的C++primer 10.6节练习的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。