protocol buffer 使用
message Test
{
//
message index_10
{
repeated int64 index_10_7 = 7;
repeated int64 index_10_6 = 6;
}
}
...
Weixin_index_10 *index_10 = wx.add_index_10_value();
index_10->add_index_10_6(48);
index_10->add_index_10_7(46);
...
序列化后顺序是 30 30(48) 38 2E(46)
怎样操作可以让其顺序是 38 2E(46) 30 30(48)
这里index_10_6必须映射46
index_10_7必须映射48
求牛牛解答
protocol?buffer?
[解决办法]
你赋值语句写反了吧,message里面7在6的前面,赋值的时候却把6写在7的前面