例子对象
typedef struct{ std:string features;} Row;内存
Row row;string
row.feautres = "hello";io
可能出错,由于struct分配的时候,仅仅是分配内存空间,并无对里面的对象进行必要的初始化,这样就有可能到只row.features.assign(xxx)报错segment fault(几率性的)stackoverflow
参考:co