Hello ,

I have map of the following type:
typedef map < int, vectorofInts > ,

Now the map has finite size. Each user when he registers, he will be allocated a key.
Lets say the map size is 4.

U1 will be allocated in K1.
next U2 on K2, U3 on K3, U4 on K4.

Later it happens in round robin way, U5 with K1 etc.

Meantime, U1 may dropoff, in that case U6, needs to be allocated K1. to keep uniformity and priority.

Any feedback or idea regarding this alogrithm and optimum way to implement. Sorry that i am not c++ stl expert, working occasionally on this.

thanks
pdk

A look at your code would help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.