or you can use my code you know,

in rcbot I use similar structures for catching network messages (without STL but my own generic structures... ho hum)
oh .. and it should be easy to understand, that's what I've been trying to do with most of my code (...heh without comments *cough*)