Bismillahirrohmanirrohim
Bisa kalian gunakan fungsi ini mudah mudahan bermanfaat,jika merasa belum paham bisa ajukan pertanyaan di komentar atau contact facebook saya atau email fickrymhd@gmail.comchar buffer[4]; buffer[0] = command[1]; buffer[1] = command[2]; buffer[2] = command[3]; buffer[3] = '\0'; int n; n = atoi(buffer);OR
char myarray[5] = {'-', '1', '2', '3', '\0'}; int i; sscanf(myarray, "%d", &i);OR
char myarray[4] = {'-','1','2','3'}; int i = atoi(myarray); printf("%d\n",i);
0 comments:
Posting Komentar