What exactly must I replace ??? with to get the iterator (it) to some element (for example Base(2)
) ?
I tried a few shots but nothing, compiler just says that it is wrong.
Here is code
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
class Base
{
public:
Base(int a) {ina = a;}
~Base() {}
int Display() {return ina;}
int ina;
};
int main(int argc, char *argv[])
{
vector<Base> myvector;
for(int i=0 ; i<10 ; i++)
{
myvector.push_back(Base(i));
}
vector<Base>::iterator it;
it = find(myvector.begin(), myvector.end(), ??? );
system("PAUSE");
return EXIT_SUCCESS;
}
Thanks in advance !