Inicialize o iterador vetorial com a função END ()

// iter points to the last element of num
iter = num.end() - 1;
Outrageous Ostrich