当前位置:网站首页>/*Rewrite the program, find the value of the element, and return the iterator 9.13: pointing to the found element. Make sure that the program works correctly when the element you are looking for does
/*Rewrite the program, find the value of the element, and return the iterator 9.13: pointing to the found element. Make sure that the program works correctly when the element you are looking for does
2022-07-04 10:26:00 【qq_ fifty-eight million seven hundred and thirty-six thousand t】
vector<int>::iterator &fun(vector<int>::iterator &count, int &n)
{
for (count;; count++)
{
if (*count == n)
return count;
else
{
*count = 0;
return count;
}
}
}
int main(void)
{
vector<int> count;
int num, num1;
cout << " Please enter container element " << endl;
while (cin >> num)
count.push_back(num);
cin.ignore();
cin.clear();
cout << " Please enter the value of the element you want to find " << endl;
cin >> num1;
vector<int>::iterator it = count.begin();
vector<int>::iterator a=fun(it, num1);
if (*a!=0 )
cout << " Data found ";
else
cout << " No data found ";
return 0;
}
边栏推荐
- system design
- Development guidance document of CMDB
- 2. Data type
- Es entry series - 6 document relevance and sorting
- 入职中国平安三周年的一些总结
- Delayed message center design
- Latex error: missing delimiter (. Inserted) {\xi \left( {p,{p_q}} \right)} \right|}}
- 【Day1】 deep-learning-basics
- The most detailed teaching -- realize win10 multi-user remote login to intranet machine at the same time -- win10+frp+rdpwrap+ Alibaba cloud server
- Four characteristics and isolation levels of database transactions
猜你喜欢

Rhsca day 11 operation

The time difference between the past time and the present time of uniapp processing, such as just, a few minutes ago, a few hours ago, a few months ago

Basic data types of MySQL

六月份阶段性大总结之Doris/Clickhouse/Hudi一网打尽

Collection of practical string functions

MySQL develops small mall management system

PHP code audit 3 - system reload vulnerability

Histogram equalization

uniapp 小于1000 按原数字显示 超过1000 数字换算成10w+ 1.3k+ 显示

Hands on deep learning (44) -- seq2seq principle and Implementation
随机推荐
Online troubleshooting
Collection of practical string functions
BGP advanced experiment
Vanishing numbers
Some summaries of the third anniversary of joining Ping An in China
六月份阶段性大总结之Doris/Clickhouse/Hudi一网打尽
OSPF comprehensive experiment
Does any teacher know how to inherit richsourcefunction custom reading Mysql to do increment?
Es advanced series - 1 JVM memory allocation
[200 opencv routines] 218 Multi line italic text watermark
Exercise 7-3 store the numbers in the array in reverse order (20 points)
leetcode1-3
For programmers, if it hurts the most...
Exercise 9-3 plane vector addition (15 points)
What is devsecops? Definitions, processes, frameworks and best practices for 2022
Use the data to tell you where is the most difficult province for the college entrance examination!
入职中国平安三周年的一些总结
AUTOSAR从入门到精通100讲(106)-域控制器中的SOA
Evolution from monomer architecture to microservice architecture
Latex error: missing delimiter (. Inserted) {\xi \left( {p,{p_q}} \right)} \right|}}