Voici le code que j'essaie de faire marcher:
//Code 1
vector<double> t1;
for(double k = 0.0; k<=2.0; k+=0.1)
t1.push_back(k);
vector<double>::iterator iter;
iter = find(t1.begin(),t1.end(), 1.0);
if(zero != t1.end())
cout << "Trouve: " << *zero << endl;
else
cout << "Trouve end" << endl;
//Sortie
Trouve end
Si j'utilise ce bout de code ci
//Code 2
vector<double> t1;
for(double k = 0.0; k<=2.0; k+=1.0)
t1.push_back(k);
vector<double>::iterator iter;
iter = find(t1.begin(),t1.end(), 1.0);
if(zero != t1.end())
cout << "Trouve: " << *zero << endl;
else
cout << "Trouve end" << endl;
//Sortie
Trouve 1
Quelqu'un a-t-il une explication?