i know this program whould be easy, but its been giving me a problem (its 8-14 in the deitel & deitel third edition C how to program book)

Input a string of the whole phone number in this exact form (555) 555-5555. Using strtok, extract the area code as a token, then convert to an integer variable. Then extract the 1st 3 digits, (save that string), and then the last 4. Concatenate those 7 numbers, then convert to a long variable.

Print the labeled 3 digit area code as the integer (without any other characters). Then print the labeled 7 numbers as a long (without any other characters).



and here is the code i have so far:


#include<stdio.h>
#include<string.h>
#include<stdlib.h>
void main ()
{
char phone[15], *tokenptr;
int phonenumber[10], area[3], numb[7], numb1[4];
int i;
long phnum;
puts("Enter phone number:");
gets(phone);
tokenptr = strtok(phone,"()");
*area = atoi(tokenptr);
tokenptr = strtok('\0', " -");
*numb = atoi(tokenptr);
tokenptr = strtok('\0', " -");
*numb1 = atoi(tokenptr);
printf("%d", area);
strcat(numb, numb1);
phnum = atol(numb);
printf("%ld", phnum);
}



the errors i get when i try to compile this program are:

line 19.10: 1506-280 (W) Function argument assignment between types "unsigned char*" and "int*" is not allowed.
line 19.16: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "int*" is not allowed.
line 20.16: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "int*" is not allowed.



_____________________________________-
IF anyone can help, you would own :-) thanks guys