here my probelm is string is constant (i.e it may have 4 or 6 or 10 values)
so in that case how shall i read the float values if the string is constant?
I want to write the generic code which should grap any number of float values in the string..Please let me know the idea in C or C++
If the string can have only 4, 6, or 10 values comma-separated, then attempt to read the maximum (10) number of floats. Remember that sscanf() returns the number of arguments actually filled in.