Multi-product code architecture

 For multi-product code for how the different parameters for different products the same attributes how simple code

for example:

Actually very simple, for example, there are many small partner in your class, how to set it, use the struct

struct STUDENT_S{
    string     name;
    int  age;
	bool sex;
	string addr;
	...
};
struct STUDENT_S g_student_param[] = {
   {“Li Lei”,     12, true,  "beijing"},
   {"Han Meimei", 11, false, "wuhan"},
}

  With this simple list of ways you can use a code once and for all, if we add other person, directly renewed his party on it, ha ha

Guess you like

Origin www.cnblogs.com/r-yan/p/12576474.html