stl-find.cc
来自「压缩包里有教材<<C++模式设计-基于QT4开源跨平台开发框架>」· CC 代码 · 共 28 行
CC
28 行
// Filename: STL-find.cc// Use of the find function.#include <iostream>#include <algorithm>#include <string>using namespace std;int main() { string words[5] = { "my", "hop", "mop", "hope", "cope" }; string* where; where = find(words, words + 5, "hop"); cout << *++where << endl; //mop sort(words, words + 5); where = find(words, words + 5, "hop"); cout << *++where << endl; //hope}/*outOOP> gpp STL-find.ccOOP> a.outmophopeOOP>*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?