Matt,
I'll need to look at your code, but I think I can apply your counter logic to my program...I'll let you know what I get :>
if(strspn(str,FLOAT_VALID) == len)
{
int count = 0;
for(int i = 0;i<len;i++)
{
if(str[i] == '.')
count++;
}...
RE: jmnagi (Programmer): I tried using atof and atoi (as well as strtof and strtoi), but I must not understand the correct placement or sequence for these commands because I wasn't getting what I expected for an answer...I actually got errors and couldn't compile it....I also think I could add...
Please help and resend your replies...my other account got deleted (it was handle iamnew2c) and I wasn't able to read the replies you sent to this question...How do I change my code so that I get 1..2 is not a float, or if there is a + or - sign in the string so that it gives me the number is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.