Perhaps you really want a (random) permutation of the sequence {0, 1...29}? Then take the first 16 entries?
There are many ways to do that. One easy way is to keep a vector< bool>(30) where you mark each value as it's selected. Then you draw in a loop until you draw a new value.
Peter