If you have data for a class that will be modified and needs to be retained throughout the program, but is only used in one member function, is it preferred to make that variabl
The question isn't "will the data be used throughout the program", but rather "if you make two objects of this class, do you want them to share this data?" If yes, make it static. If no, don't.