B
Bart Simpson
I am wriing a messaging system and I need to mantain a list of
subscribers(object) to topics (string).
which of the ff representations is better (and why?)
typedef pair<string, list<Subscriber> > topicSubscribers ;
typedef list<topicSubscribers> subscriberList ;
OR
typedef map<string, list<Subscriber> > topicSubscribers ;
typedef list<topicSubscribers> subscriberList ;
subscribers(object) to topics (string).
which of the ff representations is better (and why?)
typedef pair<string, list<Subscriber> > topicSubscribers ;
typedef list<topicSubscribers> subscriberList ;
OR
typedef map<string, list<Subscriber> > topicSubscribers ;
typedef list<topicSubscribers> subscriberList ;