http://blog.csdn.net/pipisorry/article/details/39231949
自己编写一个find查找函数:
static bool find(vector<int> bn_vec, int an){ for(vector<int>::iterator bn_vec_it = bn_vec.begin(); bn_vec_it != bn_vec.end(); bn_vec_it++){ if( *bn_vec_it == an ) return true; } return false; } vector<int> bn_vec; bn_vec.push_back(2); //... int an = 1; while( find(bn_vec, ++an) );
from:http://blog.csdn.net/pipisorry/article/details/39231949
时间: 2024-10-13 08:33:42