C++ Primer 11.1
来源:互联网 发布:unity3d导航网格寻路 编辑:程序博客网 时间:2024/06/08 13:13
[root@localhost testc++]# vi 9_00.cc
1 #include <iostream>
2 #include <list>
3 #include <vector>
4 #include <string>
5 using namespace std;
6
7 int main()
8 {
9 int search_value = 42;
10 int a[6]= {2,44,32,54,42,11};
11 vector<int> ivec(a,a+6);
12 vector<int>::const_iterator result = find(ivec.begin(),ivec.end(),search_value);
13 cout << "The value " << search_value << ( result == ivec.end()? " is not present " : " is present") <<endl;
14 return 0;
15 }
16[root@localhost testc++]# g++ 9_00.cc
[root@localhost testc++]# ./a.out
The value 42 is present
[root@localhost testc++]#
阅读全文
0 0
- C++primer
- 《C++primer》
- C++primer
- C++primer
- C++Primer
- C++Primer第五版 11.1节练习
- 重读C++Primer-1
- C++Primer Dialy
- c++primer 13.7联合
- C++Primer 13.9类域
- c++primer学习小记
- C-PRIMER PLUS读书笔记
- C-PRIMER PLUS读书笔记
- C++Primer
- C++Primer学习小记
- c++primer问题思考
- 读c++primer
- C++Primer读书笔记(一)
- MAVEN指定JDK版本和字符集编码
- Python 基础
- Python
- 方法传参
- Python 基础-函数
- C++ Primer 11.1
- win XP 下 wamp集成环境的PHPUnit安装 【转+补充】
- zf2搭建 Album是遇到的错误
- zf2学习笔记1
- 【转载】js访问系统剪贴板
- python 基础-模块
- 欢迎使用CSDN-markdown编辑器
- The Zen of Python, by Tim Peters
- 欢迎使用CSDN-markdown编辑器