由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 为什么我在array里用IsOdd 总出错?
相关主题
C++ Q96: function inheritanceC: what is the output?
C++ Q60 calling virtual function in constructor (JPMorgan)请教一个写程序的问题
这个C++程序的运行结果是什么一道google电面题,估计挂了。。。
请教C/C++小一个N个数的int数组如何找到3个majority的数?
C++的一个bug,求解one C++ question
1 11 21 1211 sequence的代码C++: what is the output? How to interpret it?
c++ class definitionC++ Q22: ostream
amazon的那道题目C++问题
相关话题的讨论汇总
话题: numbers话题: int话题: isodd话题: greater话题: equal
进入JobHunting版参与讨论
1 (共1页)
h*****g
发帖数: 944
1
g++总是说我的14行有错,为啥?
1 #include
2 #include
3 #include
4 #include
5
6 using namespace std;
7 int main(){
8 int numbers [] ={20, -30, 10, 40, 0};
9 vector five (numbers, numbers+5);
10 int cx = count_if(numbers, numbers+5, bind1st(greater_equal(),
15));
11 cout<<"There are "< 12 int dx = count_if(numbers, numbers+5, bind2nd(greater_equal(),
15));
13 cout<<"There are "< 14 int ex = count_if(numbers, numbers+5, IsOdd);
15 cout<<"There are "< 16 return 0;
17 }
o*******p
发帖数: 722
2
where is IsOdd function defined?

【在 h*****g 的大作中提到】
: g++总是说我的14行有错,为啥?
: 1 #include
: 2 #include
: 3 #include
: 4 #include
: 5
: 6 using namespace std;
: 7 int main(){
: 8 int numbers [] ={20, -30, 10, 40, 0};
: 9 vector five (numbers, numbers+5);

1 (共1页)
进入JobHunting版参与讨论
相关主题
C++问题C++的一个bug,求解
新手问个C++(Thinking in C++ source code)1 11 21 1211 sequence的代码
弱问一个c++编程题c++ class definition
c++ 程序一问amazon的那道题目
C++ Q96: function inheritanceC: what is the output?
C++ Q60 calling virtual function in constructor (JPMorgan)请教一个写程序的问题
这个C++程序的运行结果是什么一道google电面题,估计挂了。。。
请教C/C++小一个N个数的int数组如何找到3个majority的数?
相关话题的讨论汇总
话题: numbers话题: int话题: isodd话题: greater话题: equal