So, I am utilizing the string library...

Code:
str = strtok(line, ",");
variable = atof(str);

if (sizeof(variable) == sizeof(float)) {
   var_i_or_f = 1;
   variable = atof(str);
   }
else if(sizeof(variable) == sizeof(int)) {
   var_i_or_f = 0;
   variable = atoi(str);
    }
My question is: is their a way to know or test to see if str will be a int or a float?

At first, I thought I could use sizeof() and conditional statements to test before realizing that I am using atof to get str. Thus can't check it if its one or the other since im using it... Trouble is that the data switches between int and float so their is no prescribed way to know which it will be beforehand.

Is this possible.

Sorry about my code: that is from memory - it compiles correctly but what I may have typed HERE may have an error in it.