I seem to be getting an error in this code gdb tells me the segerror is comming from the code:
data[dpos]+=cmd[d];

//Strip tags
                      data[0]="";data[1]="";data[2]="";data[3]="";
                      dpos=0;
                      for(int d=0;d<cmd.size();d++){
                      if(cmd[d]==';'){
                      dpos++;
                      }
                      else{   
                      data[dpos]+=cmd[d];
                      }
                      }
                      cmd="";
                      //end strip

Could anyone please tell me whats going on?