Microcontroller › PIC › c program for gps based warning system when crossing boundaries › Hi Chalani,So you need to
July 25, 2012 at 5:37 pm
#8331
AJISH ALFRED
Participant
Hi Chalani,
So you need to convert the string to intger value, right?
Here is a simple code for string to intger conversion. Please refer it, and apply in your code.
I’m not sure the atoi() will work on your compiler.
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
int main() {
int i;
i = atoi("100"); // HERE IS THE CONVERSION
printf("The integer value is: %d", i);
getch();
return 0;
}
Try and update the result