Using GCC 4.x, g++ and STL. Which internal structure should be used to hold such array: ( (1,4), (2,8), (3,7) )? It should have static element numbers to keep the original (as added) order.
Variants:
- set<map(int,int)>
- array<map>
- array {array[2], array[2]}
Can this be done with vectors in a better looking way?
std::setholding std::pair is what first comes to mindhowever this might not comply with this requirement: