Hi all, Recently I'm running into some brick walls with a random project that I tried to do. So this project is sort of laser tag game and it requires some simple input and output. But the thing is I felt all a mess when trying to figure out the way it works.. So I bring this to you guys and hope that I might have something learned at the end of this.
So the problem requires me to do this...
**Read in data from three different text files:
Team member names for team A, a Team Member Input File
Team member names for team B, a Team Member Input File
Laser Tag Match file giving information about what player successfully tagged another, a Match File
the program will aggregate the data from the Match File to be used for output.**
After reading this I cant help but think about the way it functions and then I got really stuck in the middle of something: i dont know how I will make the file and let user actually type the name of the file and create them at the beginning. Also I felt like how do you make those player names in the file to tag each other? I honestly cant figure this out... Hope someone might be able to give me some idea though... Thank you!
Read names from file. Create some custom structure using that names
example:
1 2 3 4 5 6
struct PlayerData
{
std::string name;
int tagged;
int was_tagged;
};
Sotre those structures in some container.
Read names of who tagged who, find those persons in your container and modify their data accordingly (increase tagged field for winner, increase was_tagged for loser)