Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // string ss = "2/9";
- // maladieresult->setText(QString(ss.c_str()));
- string fievre = m_com1->currentText().toUtf8().constData();
- string douleur = m_com2->currentText().toUtf8().constData();
- string toux = m_com3->currentText().toUtf8().constData();
- map<string, float> maladiesEtScore;
- for(unsigned i(0); i < getMaladies().size(); ++i){
- string maladieParcourue = getMaladies()[i];
- maladiesEtScore.insert(make_pair(maladieParcourue, 1));
- }
- if(fievre != "NULL"){
- map<string, float>::iterator it = maladiesEtScore.begin();
- while (it != maladiesEtScore.end()){
- it->second *= calcConf(it->first, fievre, 0);
- it++;
- }
- }
- if(douleur != "NULL"){
- for (int i = 0 ; i <)
- it->second *= calcConf(it->first, douleur, 1);
- it++;
- }
- }
- if(toux != "NULL"){
- map<string, float>::iterator it = maladiesEtScore.begin();
- while (it != maladiesEtScore.end()){
- it->second *= calcConf(it->first, toux, 2);
- it++;
- }
- }
- while (it != maladiesEtScore.end()){
- cout << it->first << " : " << it->second << endl;;
- it++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement