自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 转移到 http://blog.ggt8702.com

感觉cnblogs写方便很多,转过去了,http://www.cnblogs.com/gingerjws/

2010-10-30 12:46:00 864

原创 让MessageBox出现在窗口而非桌面中央

messageboxex.h文件 // ------------------------------------------------------------------------- namespace messsageboxex { // ------------------------------------------------------------------------- int MessageBox( HWND hwnd, LPCTSTR szText, LPCTSTR

2010-08-21 19:43:00 1128

原创 贴一个分割字符串的类

template void Split( const TString &str, const TString &match, TVector &res, bool fullMatch = false ) { typedef TString::size_type (TString::*find_t)( const TString&, TString::size_type ) const; TString::size_type start = 0, skip

2010-08-21 17:47:00 577

原创 神奇的sizeof

关于sizeof运算符的使用和注意事项,这篇http://hi.baidu.com/xung/blog/item/14267827c0f42c06918f9d04.html有比较好的说明,可以看下。 sizeof最主要的用途是计算大小,以避免代码中出现一些写死的机器相关的值。另外它还是一个很神奇的运算符,由于它并不会真正执行表达式而仅仅返回大小的特性,你可以做一些很棒的事。 看一个例子,它来自LOKI库: Typelist要管理一堆Type,某些操作需要知道其中两个Type的继承关系,如何用代码做到?

2010-07-31 11:36:00 566

原创 Loki系列二:Typelist的基本操作2

1. append操作 append物可以是NullType、Type T、另一个Typelist         template struct Append;         template struct Append // NullType         {             typedef NullType Result;         };         template struct Append // Type T         {          

2010-07-31 11:35:00 654

原创 Loki系列二:Typelist的基本操作1

1. 计算Typelist长度         template struct Length;         template struct Length         {             enum { value = 0 };         };         template         struct Length >         {             enum { value = 1 + Length::value };         };

2010-07-31 11:34:00 712

原创 Loki系列一:优雅的Typelist

Typelist定义: template struct Typelist { typedef T Head; typedef U Tail; }; 约定为Typelist的最后一个元素 : NullType 定义class NullType {}; 约定Tail可以为另一个Typelist,这样就可以无限扩充,管理任意多的类型了 MakeTypelist定义:(为18个类型以内的Typelist提供帮助,足够用了) template struct MakeTypelist

2010-07-31 11:33:00 647

原创 神奇的luabind

c++源文件如下 #include #include void greet() {     std::cout scope def(char const* name, F f, Policies const& policies) {     return scope(std::auto_ptr(         new detail::function_registration(name, f, policies))); } template scope def(char c

2010-07-31 11:28:00 682

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除