多产品代码架构
对于多产品代码来说如何,对于不同产品相同属性不同参数如何简单code
举个例子:
其实很简单,比如说你们班有很多小伙伴,如何设置信息呢,用到了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"}, }
用这种简单列举的方式就可以用一套代码,一劳永逸,如果再添加其他人的话,直接再起一行就可以了,哈哈
相关推荐
cywhoyi 2020-11-23
rise 2020-11-22
sssdssxss 2020-11-20
xuedabao 2020-11-19
alien 2020-11-15
JLow 2020-11-12
ruancw 2020-11-10
地平线 2020-11-02
yinren 2020-11-02
evolone 2020-10-29
liupengqwert 2020-10-28
acaoye 2020-10-27
jyj0 2020-10-27
ruancw 2020-10-27
JAVA飘香 2020-10-26
withjeffrey 2020-10-23
litefish 2020-10-16
richermen 2020-10-15
kjyiyi 2020-10-10