Invalid conversion from ‘const char*’ to ‘int'

Hello after a long absence. I have this question, I have a problem converting const char to int. I don't know how to do it, I tried toInt () but unfortunately it only applies to the string.

TinyGPSCustom sats (gps, "GPGSV", 3);
int sat_numb = sats.value (). toInt ();

And I get such a message
invalid conversion from 'const char*' to 'int' [-fpermissive]

Could someone please explain to me how to convert it correctly?

thank you in advance for your help

Give atoi() a try.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.