Regarding factorization of a programm using Sieve

I have a doubt in the program I have commented it. Please help me out.

hello @sarthak_singhal
please read about reference variable
and difference between pass by value and pass by reference.
after that u can easily understand why we are using & before prime

Now I have understand the concept behind “&” but I have come across another doubt. I have commented it in same program regarding iterator .

use for(auto k : some vector) we iterator of vector values , k is not itertator , its value

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.