25 lines
424 B
C++
25 lines
424 B
C++
|
|
#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;
|
|
} |