I want to read a date from a file in the following way:
for example
void Store::leerUsuarios(const string &nombreFichero){
ifstream fichero;
fichero.open(nombreFichero);
if (fichero.is_open()) {
string nom, mail;
int dia; int mes; int anyo;
while ((fichero >> nombre) && (fichero >> mail) && (fichero >> dia) &&
(fichero >> mes) && (fichero >> anyo)) {
fichero >> nombre;
fichero >> mail;
fichero >> dia;
fichero >> mes;
fichero >> anyo;
}
fichero.close();
}
}
with fstream in a file it is separated by spaces, but if I have a date for example:
01/01/2000
How do I make it so that I can read that?