摘要:
Semaphore是System.Threading下的类,限制可同时访问某一资源或资源池的线程数。 常用构造方法 https://msdn.microsoft.com/zh-cn/library/e1hct27h(v=vs.110).aspx public Semaphore( int initi 阅读全文
摘要:
1.编写一个程序判断一个变量是不是指针? 拾遗-C++中仍然支持C语言中的可变参数函数-C++编译器的匹配调用优先级1.重载函数2.函数模板3.变参函数 #include <iostream> #include <string> using namespace std; class Test { p 阅读全文
摘要:
类型识别 C++中如何得到动态类型? #include <iostream> #include <string> using namespace std; class Base { public: virtual string type() { return "Base"; } }; class D 阅读全文
摘要:
C++中的异常处理(下) array.h #ifndef _ARRAY_H_ #define _ARRAY_H_ #include <stdexcept> using namespace std; template < typename T, int N > class Array { T m_ar 阅读全文