My task is to get input from cin (using push_back) as a vector and then sort the vector based on 'pairs' that are entered linearly into said vector. Essentially I want to convert A[]={1,2,3,4,5,6} into vector< pair<int, int> > v = {{1,2},{3,4},{5,6}}, then sort (already done in this example.)
I've tried using std::fill, but it doesn't conform to my needs. Other resources on this site and stackoverflow have gone a little over my head, is there a way to input directly into a vector pair?