If the two numbers are the related squares , then append them to the array
if ( lhs == rhs ) { v . push_back ( i ) ; v . push_back ( base [ j ] ) ; pairs . push_back ( v ) ; } } } vector < int > newvec ;