当前位置:网站首页>/*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;
}
边栏推荐
- Delayed message center design
- Advanced technology management - how to design and follow up the performance of students at different levels
- Latex arranges single column table pictures in double column format articles
- Software sharing: the best PDF document conversion tool and PDF Suite Enterprise version sharing | with sharing
- Hands on deep learning (45) -- bundle search
- Evolution from monomer architecture to microservice architecture
- Sword finger offer 05 (implemented in C language)
- Online troubleshooting
- Today's sleep quality record 78 points
- DCL statement of MySQL Foundation
猜你喜欢

Rhsca day 11 operation
Si vous ne connaissez pas ces quatre modes de mise en cache, vous osez dire que vous connaissez la mise en cache?

Time complexity and space complexity

Recursion and divide and conquer strategy
![[FAQ] summary of common causes and solutions of Huawei account service error 907135701](/img/73/c4ee842475f05e2e67297fcac68779.png)
[FAQ] summary of common causes and solutions of Huawei account service error 907135701

Software sharing: the best PDF document conversion tool and PDF Suite Enterprise version sharing | with sharing

Linked list operation can never change without its roots

What is an excellent architect in my heart?

Collection of practical string functions

Hands on deep learning (45) -- bundle search
随机推荐
Differences among opencv versions
Collection of practical string functions
Velodyne configuration command
Latex insert picture, insert formula
uniapp 小于1000 按原数字显示 超过1000 数字换算成10w+ 1.3k+ 显示
Histogram equalization
Es advanced series - 1 JVM memory allocation
Basic principle of servlet and application of common API methods
leetcode729. My schedule 1
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
2021-08-10 character pointer
Rhcsa operation
Rhcsa day 10 operation
2020-03-28
Exercise 9-3 plane vector addition (15 points)
Rhcsa day 9
If you don't know these four caching modes, dare you say you understand caching?
System. Currenttimemillis() and system Nanotime (), which is faster? Don't use it wrong!
The future education examination system cannot answer questions, and there is no response after clicking on the options, and the answers will not be recorded
DDL statement of MySQL Foundation