iostream - Standard Input / Output Streams Library

Sources d'information

Librairie(s) requise(s)

iostream

Comment ça marche

std::cout << "First Name : " << (this->_contacts[selection - 1].getFirstName()) << std::endl;

Affichage d'une string provenant d'un getteur

std::cin >> selection;

Saisie d'un paramètre, ici un int.

while (!std::cin.eof())

Le cin.eof() réajit au ctrl-c, ctrl-\ et ctrl-z

std::cin.ignore();

Ré-initialise cin pour un prochain getline.

this->_current = std::min(8, this->_current + 1);

min choisi le parametre le plus petit entre 8 et current + 1

retour


© 2022, vroch
Revisé le : 26 oct 2022
URL : http://vroch.ch/vr_tech_000.html
Main : http://vroch.ch