Hey guys, I've been working on some code that is supposed take in a string, test if the string contains integers only, and then convert it to a double.
It is working mostly as intended, except for this one specific case: It will reject a string like "abcde123" and ask for another input. However, when you enter "123abcde" it does not ask for another input, it simply accepts the integers, ignores the characters, and continues without error.
I would be very appreciative if someone could help me narrow down the error in my logic. I'm thinking it has something to do with how 'atof()' works, or there's something off with my 'is_number' function.