ciao
ho una stringa "CIAO | PIPPO" voglio suddividere questa in due stringhe CIAO e PIPPO
io ho fatto così ma non funziona:
codice:
       
 while (argv[x]!=NULL)
         {
            if (argv[x]!="|")
              if(tmp==0)//{
                y=y+1;       
                pipeuno[x]=argv[x];
               }
              else 
              { 
               pipedue[y]=argv[x];
               y=y+1;
              }
            else tmp=1;
           x=x+1;
          }
dove argv è un array di stringhe (che devo splittare) passato nella funzione ed è dichiarato come **argv
mentre pipeuno e pipedue come stringe globali così:
char *pipeuno;
char *pipedue;