I made a class named as Sensor, in which I made a struct to store the sensor values,
struct sensor_reading {
int time = 0;
double temperature = 0;
double humidity = 0;
};
sensor_reading reading;
How can another file to get access to the struct value in the Sensor class ?
If it doesn't work, I am thinking to make a function and store the sensor values in a array and return the sensor values .