My program is supposed to read numerical data (in pairs) from a text file, remove the duplicates and then tell me the size of the vector before moving on to other things. I tested the code below and it works with files that have about 10-20 lines of data, however when I try it on larger data sets (over 100,000 lines of numerical data), there is no output when I try to cout the size(); of the vector. Not sure what the problem is.
while( getline( fs1, instrng ) ) {
istringstream s1(instrng);
int a, b;
s1 >> a >> b;
pair<int,int> pair1 = make_pair(a,b);
vec1.push_back( pair1 );
sort( vec1.begin(), myvec1.end() );
myvec.erase(unique(myvec.begin(),myvec.end()), myvec.end());