strcmp char array in C
===

    ...
    main(){
       char **src_ip[10];
       char **dest_ip[10];
       char **lat[10];
       char *ip[20];
 
       while{
          //read file
          //fgets();

          src_ip[j] = &data[0];
          dest_ip[j] = &data[1];
          lat[j] = &data[2];

          int idx;
          int addip;

          for(idx=0;idx<20;idx++)
          {
              addip = 0;
              //check to see if the ip is already in array
              if((strcmp(*(src_ip[j],ip[idx]) == 0) && (strcmp(*(dest_ip[j]),ip[idx]) == 0))
              {
                  addip=1;
                  break;
              }
              //if ip was already found then addip would equals to 1
              if(!addip){
                  printf("new node: %s",*(ip[idx]));
              }
              else
                  printf("Exist");
          }while(idx); //loop if the ip is the same and look for new one
       }
       j++;
    }
I want to compare char string in two 1d array, the src_ip[j] and dest_ip[j], and insert into one array ip[idx]. For example, when i look for ip[1], it will go to src_ip[1]. Meaning that it's only refer to one array ip[idx] instead of looking seperately into src_ip and dest_ip. There is some problem in the code,i think i have left out something. Please advice me on this,appreciate your helps. 