Global variables are not a good idea in general.
A better alternative is to have local variables in your main
and pass them to the functions you want by (const) reference.
A struct could be used to hold the player info.
Structs is a way you can build your own types
out of other types (primitive or user defined).
Does anyone here know where to look for a tutorial on opening a .txt file for an example,
using the value of a string as the name for the file to open?
Instead of writing a file name in "" , I want it to open a file that has the
same name as the value of the string "FileName". By importing the value
from the string as name of the file to open.