this is what i'm doing..
cout << "Value:" << endl;
cin>>it; //it is int
cout<<1;
for (pos = v->begin(); pos != v->end(); pos++) { // pos is an iterator and v is a vector<int>
if (*pos < it) {
v2->push_back(*pos);
cout << *pos << endl;
}
}
cout<<2;
This is what i get
Value:
2
then freezes.
I tried "std::cin.get();" but it gets worse: it freezes before i can insert.