I am making a program (for practice and fun) that takes baseball players and information about each respective player and stores it in a struct then writes it to an output file. I want to handle the adding of the players with a function called addPlayer(). In general, should this function have "parameters"? Meaning addplayer(parameter a, parameter b,...) (sorry if that wasn't the right term. Correct me if I'm wrong please.) I had to post this with my phone so I can't really upload any code right now and I know that makes this a more difficult question to answer that way. :-/ sorry and thank you in advance. Any input is appreciated.
The Player class just holds data for a single player, and the Team class holds data for all the players in the team. The Team class would then have the addPalyer function taking an argument as const Player. The controlling routine would then use an instance of Team as follows to add a new player: