摘要: 本文转自:http://disksing.com/pb-on-gamedev 提要 Protocol Buffers(后简称pb)是google提供的一种结构化数据格式。类似于xml或JSON,有独立于语言和平台的特点,常常用来做通信协议。与xml或JSON相比,pb还有格式更紧凑的优势,并且序列化 阅读全文
posted @ 2016-05-14 22:53 我们的时光 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 1 // 先定义两种类型 2 struct A{}; 3 struct B{}; 4 5 class Foo 6 { 7 public: 8 // 将类型A绑定到Foo 9 typedef A classtype; 10 11 void foo() 12 { 13 std::cout 31 class test_traits... 阅读全文
posted @ 2016-04-10 13:13 我们的时光 阅读(251) 评论(0) 推荐(0) 编辑
摘要: —– BEGIN LICENSE —–Andrew WeberSingle User LicenseEA7E-855605813A03DD 5E4AD9E6 6C0EEB94 BC99798F942194A6 02396E98 E62C9979 4BB979FE91424C9D A45400BF F... 阅读全文
posted @ 2015-06-21 15:38 我们的时光 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 1 // 2 // 2015-03-05 03/55 3 // 指针、返回值、成员函数 之 const 4 // 5 6 #include 7 #include 8 9 using namespace std; 10 11 // --------------------... 阅读全文
posted @ 2015-03-05 23:38 我们的时光 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 1 // 2 // 2015-03-04 02/55 3 // 以 const enum inline 代替 #define 4 // 5 6 // 防止同一个物理文件被包含多次 7 #pragma once 8 9 // ----------------------------------1... 阅读全文
posted @ 2015-03-04 22:05 我们的时光 阅读(123) 评论(0) 推荐(0) 编辑