rendered paste bodypair<string,string> strtokenizer(string& chaine,string& delim,pair& mot){ int i; int nbMots; //nombres de mots trouvés string tmpchaine; //contient une sous-chaine trouvé temporairement pair<string,string> motchaine; for(i=0;i<chaine.length();i++){ if(chaine[i]!=delim){ tmpchaine+=chaine[i]; } else{//On arrive au delemiteur ici if(tmpchaine!=""){ nbMots++; //augementer le nombre de mots trouvés if(nbMots<=2) if(motchaine.first==""){ motchaine.first=tmpchaine; tmpchaine=""; } else{ motchaine.second=tmpchaine; tmpchaine=""; } } else{ cout<<"Erreur"<<endl; return false; } } } return motchaine;}