Is there a way or function to check if a float is assigned a value to?

I want to find the max and min value from numbers of a csv file. I don't know the range of the values, so I can't really just assume an initial min or max value to compare to in my while loop. I was thinking, if there is such a function that can check if a float is already assigned a value to, then I can say if it hasn't a value then it should take the current value, else I can compare the numbers.
Assume that the numbers are of type float, then you can use these for the initial min/max values to compare against:

1
2
3
4
#include <limits>

float mymin {std::std::numeric_limits<float>::max()};
float mymax {std::std::numeric_limits<float>::lowest()};


Topic archived. No new replies allowed.