I wanted to generate random names using rand() and linking each name to an integer (e.g. 1 if for Daniel, 2 for Sarah and so on). I wrote fuction "void random_name ()" and used switch() to link each number rand() returned to a name, but now I want to do this using a file. How can I read from file only the line starting with 1 for example? Thank you:)
Aucun commentaire:
Enregistrer un commentaire