首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

protocol buffer 使用,该如何处理

2013-09-28 
protocol buffer 使用message Test{ //message index_10{repeatedint64 index_10_7 7repeatedint64 ind

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的前面

热点排行