Suppose you have a generic algorithm that requires forward iterators. Can I use it with a vector or a list even though these iterators are random access and bidirectional iterators respectively? Explain.
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q49: Suppose we are given an STL vector
Q50: If myVec has type vector<double> what type
Q51: Why does the compiler complain if I
Q52: Why are the elements in the STL
Q53: I have an algorithm that runs in
Q55: For a vector, inserting or deleting invalidates
Q56: What is different about mathematical sets and
Q57: What kind of iterators does the queue
Q58: Declare a stack template container to hold
Q59: Suppose we are given an STL vector
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents