Seive prooblem nth prime

I used vector to store prime but its not showing in the output

@guptashubham210a initialize your array arr inside any function primesieve or main cause allocation all values of an array globally may gives bad_allocation error.

I have tried intialising array inside main and primeseive function but error is coming out

try this way https://ide.codingblocks.com/s/282557

ITS not running in vscode

sir had used bitset instead of array and inialised globally ,but what is bitset?

sir
sir has also inialised gloabally but no error

@guptashubham210a bit set is kind of boolean array which only takes values 0 or 1 but it is efficient in terms of allocation than that of bool array.

this code is not working on vscode

try it in some other online IDE can’t say about VS.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.