I take it you use MSVC++?
This should work, but I'm not able to test it at the moment so you're on your own for debugging.
Code:
#include "stdafx.h"
#include <cstring>
#include <iostream>
using namespace std;
int main(){
char phone[15]; char area[7]; char num[10]; char* tokenPtr;
int areaCode;
long int pnum;
cout << "Enter a phone number [(###) ###-####]: ";
cin.getline(phone, 15);
tokenPtr = strtok(phone, "()- ");
area = tokenPtr; areaCode = atoi(area);
for(int i = 0; i < 3; i++){
tokenPtr = strtok(NULL, "()- ");
strcat(num, tokenPtr);
}
cout << areaCode << atol(num) << endl;
return 0;
}