A runtime dynamically add a class member variables
Time:09-27
For example, we design a staff of two members of the class has a name and age, when the user runs the user was added to the height and weight, we use how to save the object serialization to save time? Or have other better solution to this problem?
CodePudding user response:
Define a format, such as the front is showed that the height, weight, followed by the corresponding data
CodePudding user response:
C + + is a strongly typed language, and don't like c and JAvA reflection, well dynamic, even if it benefits and is worth but also bring trouble