dimanche 12 février 2017

C - How do you extract spaced numbers in a string to then convert them into floats and adding them in a 1D array?

Vote count: 0

For example, I have a string like this "32 21 24" and what I want to do is extract each number such as "32" and convert it to a float (atof()?) and put that converted number into a float array of size equal to the number of numbers in the string. Any suggestions?

asked 1 min ago

Let's block ads! (Why?)



C - How do you extract spaced numbers in a string to then convert them into floats and adding them in a 1D array?

Aucun commentaire:

Enregistrer un commentaire