Hi
I have the token variable which is for example: 123519 with my function:
token = nmeatoken(nmea_buffer, &index); //Hora UTC
hores = strtol(token, NULL, 10);
I wanted to print hores which it should print 123519 because my function in theory is what it does.
What I did, was: pc.putc (hores); and I haven't got anything.
I found that I should put: pc.printf (%ld", hores); but I really don't know why.
Now this problem is solved, but I have another problem. How can I print an int?
Because I've passed my variable hores (which is an unsigned long) to an int:.
hora=hores;
where hora is an int and hores is an unsigned long and I want to know if this conversion is ok or not. How can I do?
Hi!
Has someone tried to implement the functions from stdlib.h of c++ in the mbed? I've tried to put in my program the strtol but it doesn't work. I've also tried to import the stdlib.h but the compiler gives some errors.
What can I do?
Thanks