Prime factorization problem

i have wriiten the code as directed in the video but it is not running . what is wrong in the code?

@Raghavsingla522
There was not anything which is logically wrong, you were adding the correct numbers in the primes vector.
Have a look at the corrected code https://ide.codingblocks.com/s/270086
PS:- I didn’t not removed the print statements i used for debugging, this may be helpful for you to learn how to debug the code.

@sanyamsinghalmnnit if my code was logically correct, then why was it not running earlier ?
please tell the mistake i have done in my code also .

@Raghavsingla522 actually i meant the logic you maybe trying to implement was correct but doing some mistake. You have check if p[i]==1 or not before pushing that number into the prime’s vector.