First, define a structure, including float variables and bool variables. If it is pure C, you can use integer 0 and 1 instead of bool variables as parameters to judge whether it is an integer, and then define an array with this structure. When initializing, if the value is an integer, assign the bool variable to true or the integer parameter to 1 (Note that the integer variable here is a parameter for your judgment, not for you to store the value. If it is a floating-point value, assign the bool variable or your plastic variable to the opposite sign as when saving the plastic value (that is, if the bool variable is true(false) when saving the plastic value, the bool variable is false(true) when saving the floating-point value, and the assignment of the plastic parameter is the same). When reading numerical values, distinguish integer and floating-point types by bool variable or your integer parameter 0, 1, make a judgment, and then perform type conversion.
This should be a very simple question. Think more, there will always be a way.