03 2013 档案

摘要:int lua_next (lua_State *L, int index);Pops a key from the stack, and pushes a key-value pair from the table at the given index (the "next" pair after the given key). If there are no more elements in the table, thenlua_nextreturns 0 (and pushes nothing).A typical traversal looks like this: 阅读全文
posted @ 2013-03-20 19:29 good90 阅读(698) 评论(0) 推荐(0)
摘要:/ *ObjectPool.h */#include <iostream>#include <queue>#include <vector>template <typename T>class ObjectPool{public: ObjectPool(size_t chunk_size = kdefault_size); ~ObjectPool(); T& acquire_object(); void release_object(T& obj);protected: void allocate_chunk(); static 阅读全文
posted @ 2013-03-16 14:58 good90 阅读(2957) 评论(0) 推荐(1)
摘要:编译的时候出现warning:Linker Tools Warning LNK4098defaultlib "library" conflicts with use of other libs; use /NODEFAULTLIB:library说明存在库冲突,在link选项中加参数:/VERBOSE:LIB 再编译则显示进度消息,仅指示所搜索的库。所显示的信息包括库搜索进程,同时还列出每个库和对象名(包括完整路径),正从库中解析的符号,以及引用该符号的对象的列表。可以看到确实依赖了debug版本的库。在link选项中加参数/NODEFAULTLIB:msvcrtd.lib 阅读全文
posted @ 2013-03-01 09:41 good90 阅读(2384) 评论(1) 推荐(1)