int main(void) {
Fr = fopen("ContactList.txt", "r");
while (fscanf(Fr, "%d", &num) != EOF) {
++counter;
}
ContactList.txt
类似这样:
Name Surname XXX-XXX-XXXX XXX-XXX-XXXX Adress Adress Mail
Name(1) Surname XXX-XXX-XXXX XXX-XXX-XXXX Adress Adress Mail
Name(2) Surname XXX-XXX-XXXX XXX-XXX-XXXX Adress Adress Mail
...