C++
Goahead123321
这个作者很懒,什么都没留下…
展开
-
C Traps and Pitfalls
2.1 typedef void *signal(int, (void(*) (int))) (int); typedef void (*HANDLER) (int); HANDLER signal(int, HANDLER); 3.3 下面数组和指针的区别 extern char *hello; extern char hello[]; 4.3 命名冲突与st原创 2013-06-05 19:11:59 · 612 阅读 · 0 评论 -
STL源码剖析:partial ordering of function templates
/* partial ordering of function templates */ #include using namespace std; class alloc { }; template class vector { public: void swap(vector&) { cout<<"swap()"<<endl; } }; #ifdef _STL_FUNCT原创 2013-11-18 14:49:23 · 1044 阅读 · 0 评论 -
STL源码剖析:class template中拥有static data members
/* class template中拥有static data members. */ #include using namespace std; template class testClass { public: static int _data; }; int testClass::_data = 1; int testClass::_data = 2; int main()原创 2013-11-18 10:28:39 · 874 阅读 · 0 评论 -
STL源码剖析:class template partial specialization
/* class template partial specialization */ #include using namespace std; // 一般化设计 template class testClass { public: testClass() { cout<<"I,O"<<endl; } }; // 特殊化设计 template class testClas原创 2013-11-18 10:58:51 · 989 阅读 · 0 评论