I've created a file called country.txt which holds a list of 100 countries' name. Eg (to name a few):
America
Bahamas
Canada
Denmark
Eygpt
France
Germany
Hong Kong
My question is, how would I have the computer pick a random country name from the list above? Do I have to put a number at the front like below and use the random number generator? (if yes, can someone guide me on how to write in out in C++ format?)
1America
2Bahamas
3Canada
4Denmark
5Eygpt
6France
7Germany
8Hong Kong
Thank you!