TP7 : Mise à jour avec les fichiers moodle

This commit is contained in:
2024-11-28 13:36:34 +01:00
parent a465aa9e59
commit 456150e6b1
5 changed files with 400 additions and 744 deletions

View File

@@ -6,6 +6,16 @@
using namespace std;
void getfloat(ifstream& s, float& f, const char sep) {
s >> f;
s.ignore();
}
void getint(ifstream& s, int& f, const char sep) {
s >> f;
s.ignore();
}
/*void getfloat(ifstream& s, float& f, const char sep) {
string tmp;
getline(s, tmp, sep);
@@ -23,9 +33,9 @@ void getfloat(ifstream& s, float& f, const char sep) {
}
f = stof(tmp);
}
}*/
void getint(ifstream& s, int& f, const char sep) {
/*void getint(ifstream& s, int& f, const char sep) {
string tmp;
getline(s, tmp, sep);
@@ -34,4 +44,4 @@ void getint(ifstream& s, int& f, const char sep) {
return;
f = stoi(tmp);
}
}*/