Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2018
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. // string ss = "2/9";
  2. // maladieresult->setText(QString(ss.c_str()));
  3. string fievre = m_com1->currentText().toUtf8().constData();
  4. string douleur = m_com2->currentText().toUtf8().constData();
  5. string toux = m_com3->currentText().toUtf8().constData();
  6.  
  7.  
  8.  
  9. map<string, float> maladiesEtScore;
  10.  
  11.  
  12. for(unsigned i(0); i < getMaladies().size(); ++i){
  13. string maladieParcourue = getMaladies()[i];
  14. maladiesEtScore.insert(make_pair(maladieParcourue, 1));
  15. }
  16.  
  17. if(fievre != "NULL"){
  18. map<string, float>::iterator it = maladiesEtScore.begin();
  19. while (it != maladiesEtScore.end()){
  20. it->second *= calcConf(it->first, fievre, 0);
  21. it++;
  22. }
  23. }
  24.  
  25. if(douleur != "NULL"){
  26.  
  27. for (int i = 0 ; i <)
  28. it->second *= calcConf(it->first, douleur, 1);
  29. it++;
  30. }
  31. }
  32.  
  33. if(toux != "NULL"){
  34. map<string, float>::iterator it = maladiesEtScore.begin();
  35. while (it != maladiesEtScore.end()){
  36. it->second *= calcConf(it->first, toux, 2);
  37. it++;
  38. }
  39. }
  40.  
  41.  
  42. while (it != maladiesEtScore.end()){
  43. cout << it->first << " : " << it->second << endl;;
  44. it++;
  45.  
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement