Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. void read_existing_contacts(MANAGER *m,char path[]){
  2.    
  3.     FILE *fp=NULL;
  4.    
  5.     char name[100];
  6.     char fname[20];
  7.     char pfvalue[100];
  8.     int weight;
  9.    
  10.     fp=fopen(path, "r");
  11.     if (fp == NULL){
  12.         printf("File Error!\n");
  13.         exit(0);
  14.     }
  15.    
  16.     while(fgets(name, 100, fp)){
  17.         //printf("%s\n",name);
  18.         char *token = strtok(name, ";");
  19.         printf("%s\n",token);
  20.        
  21.    
  22.     }
  23.     fclose(fp);
  24.    
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement