【发布时间】:2013-07-04 13:37:56
【问题描述】:
我有一个Player 结构,其中包含指向其最近邻居的指针列表。该结构在 C++ 中可能如下所示:
struct Player {
string handle;
vector<Player*> neighbors;
};
我想使用 protobuf 来序列化这个类的实例。我将如何编写消息定义来表示上述结构?
【问题讨论】:
标签: c++ serialization protocol-buffers self-reference