Hi at all,
I have to convert a characters into an Integer.
I received via TCP " INTERVAL 500" and the Timer interval has to be set to 500, for example. I thought strtol() will solve my problem.
char *payload = "INTERVAL 500";
int tinterval = 0;
inteval = strtol(payload,NULL,10);
But this dosen't work, because there are nonconvertible chars at the beginning.
Can someone give me a hint to solve my problem? I have no idea at the moment.