60 lines
No EOL
1.6 KiB
C++
60 lines
No EOL
1.6 KiB
C++
#include "bdd.h"
|
|
#include "ecran.h"
|
|
|
|
#include <iostream>
|
|
#include <list>
|
|
#include <algorithm>
|
|
#include "string.h"
|
|
using namespace std;
|
|
void listequestions_init(ecran& lcd){
|
|
list<string> listeQ;
|
|
list<string>::iterator it;
|
|
listeQ.push_back("1 Disney");
|
|
listeQ.push_back("2 Geographie");
|
|
lcd.clear();
|
|
lcd.print("Thematiques : ");
|
|
delay(3000);
|
|
lcd.clear();
|
|
int nbT=0;
|
|
for(it=listeQ.begin();it!=listeQ.end();it++) {
|
|
|
|
lcd.setCursor(0, nbT++);
|
|
lcd.print((*it).c_str());
|
|
|
|
|
|
}//cout<<*it<<" ";
|
|
delay(5000);
|
|
|
|
list<string> Questions_Disney;
|
|
Questions_Disney.push_back("Patrick est le nom du cameleon de Raiponce ?");
|
|
Questions_Disney.push_back("La robe de Tiana est verte ?");
|
|
Questions_Disney.push_back("Cendrillon etait le premier disney ?");
|
|
|
|
for(it=Questions_Disney.begin();it!=Questions_Disney.end();it++) {
|
|
lcd.clear();
|
|
lcd.setCursor(0, 0);
|
|
lcd.print((*it).c_str());
|
|
|
|
// Fait défiler le texte vers la gauche
|
|
for(int i = 0; i < (*it).length(); i++) {
|
|
lcd.scrollDisplayLeft();
|
|
delay(300);
|
|
}
|
|
delay(2000);
|
|
|
|
}
|
|
|
|
/*cout<<endl;
|
|
cout<<"Questions_Disney : "<<endl;
|
|
for(it=Questions_Disney.begin();it!=Questions_Disney.end();it++) {cout<<*it<<" ";cout<<endl;}
|
|
cout<<endl;*/
|
|
|
|
list<string> Questions_Geographie;
|
|
Questions_Geographie.push_back("Rio de Janeiro est la capitale du Bresil ?");
|
|
Questions_Geographie.push_back("L'Inde est le pays le plus peuple ?");
|
|
Questions_Geographie.push_back("Les Pyrenees Atlantiques ont 64 en numéro de département ?");
|
|
/*cout<<"Questions_Géographie : "<<endl;
|
|
|
|
for(it=Questions_Disney.begin();it!=Questions_Disney.end();it++) {cout<<*it<<" ";cout<<endl;}
|
|
*/
|
|
} |