Problem with malloc()

Try this:

vetorV = (int *) malloc(40*sizeof(int));

--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons