Variable size bitset [duplicate]
问题 This question already has answers here : Define bitset size at initialization? (6 answers) Closed 2 years ago . I am practicing a question on array in which I have to find unique elements. Now for this my logic is to find the max element in the array and define the bitset for that. But problem is bitset needs a constant value so how to overcome this, below are some of my question on this: a) Can I, by any chance, define the bitset with a variable size? b) If not, then what is the best