Code: randomarray(first); Don't pass the pointer to the vector, just pass the vector: Code: randomarray(vettore);
randomarray(first);
randomarray(vettore);