TP7 : Mise à jour avec les fichiers moodle
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}*/
|
||||
Reference in New Issue
Block a user