My code is meant to get rid of duplicates found in list. The only problem is that there was three zeroes at the end of the list after it was fixed. I made a for loop to check for zeroes, but it only got rid of two and not the last one.
Line 34: What do you think this line does? Hint: Nothing.
You should consider why you're seeing zeroes. You don't push any zeroes onto your vector (14-22). Therefore, lines 46-52 should be unnecessary. BTW, these lines are wrong. If number[m] is 0, you're removing the last entry in the vector which has no relation to number[m].
Lines 35-37: Why not use std::vector::erase to remove the duplicate entry rather than trying to move the vector down yourself, which you're not doing correctly.