Original Post
I'm writing a baseball game and I'm trying to manage the teams by having all the teams and their players in separate files. What I need to do is load the right file according to what team the player picks. For example if a player picks the Cubs, my program needs to automatically load C:/Teams/Cubs.txt. Same thing with the Astros , C:/Teams/Astros.txt. I thought that I could just pass a string of the teamd and create a string with the file name from that but when I try to load a istream I get an error. I'm assuming that an istream declaration can't have a string. Can anyone else think of a better way to load a corresponding according to what team the player picks?? Thanks