Float to int

I am having issues being able to take one array and copy it unto another one. The program is designed to run a scan. If int Volts[Z] is empty, it will take the newly acquired data from float voltage and store it in Volts[Z]. Then when the program is ran again, it will notice that Volts[Z] is not empty and then move on to compare the new data with the old.

int sensorPeakSum = 0;

sensorValue[ i ] = analogRead(A8);

sensorPeakSum+= sensorValue[ i ];

float voltage = (sensorPeakSum/x)* (10.0/1023.0);

up to this part of the code, it works. :relaxed:

now what I try to do is

if Volts[Z] == '\0'

Volts[Z] = voltage;

problem is

voltage = 0.1
Volts[Z] = 0. :~

found issue, set int volts to float volts.... /facepalm