Alternative for structure in STL?

Recently, I Solved a problem where using structure seemed easy and efficient to me instead of using different vectors ( eg: for sorting as per a single parameter,etc). My code was somewhat similar to this question code:, but i wonder is their any efficient way instead of using structure or vector of pair of pairs… for the same? and is using vectors of pairs of pairs better than using structure?