This commit is contained in:
2024-11-26 20:38:50 +01:00
parent 582bc26ad7
commit b1d4730e60
13 changed files with 1308 additions and 0 deletions

25
TP7/Pays.cpp Normal file
View File

@@ -0,0 +1,25 @@
#include "Pays.h"
#include <iostream>
using namespace std;
void Pays::saisie(ifstream &in) {
getline(in, Region, ';');
getline(in, Nom, ';');
getfloat(in, Population, ';');
// Pas dans le fichier :(
// getfloat(in, Area, ';');
// "trim" en c++
auto end = Nom.end();
while (*(end-1) == ' ')
end--;
Nom.erase(end, Nom.end());
}
void Pays::affichage() {
cout << Region << " " << Nom << " " << Population;
}