Q: 20
What happens when you attempt to compile and run the following code?
#include
#include
#include
using namespace std;
int main(){
int t[] ={ 3, 4, 2, 1, 6, 5, 7, 9, 8, 0 };
vectorv(t, t+10);
multiset s1(v.begin(),v.end());
s1.insert(v.begin(),v.end());
pair<multiset::iterator,multiset::iterator> range;
range = s1.equal_range(6);
while (range.first != range.second) {
cout<<*range.first<<" "; range.first++;
}
return 0;
}
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.