摘要:
还是直接上代码吧: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 10 static const int hashtable_length = 6151; 11 static const int hashtable_compare = 769; 12 13 // 用于定位一个Bucket 14 unsigned int hash1(const char* str) 15 { 16 const char... 阅读全文
posted @ 2013-09-22 23:30
铁甲小宝
阅读(222)
评论(0)
推荐(1)
摘要:
练习代码: 1 #include 2 #include 3 4 class Something 5 { 6 private: 7 char* name; 8 int weight; 9 public: 10 Something(){ 11 printf("调用了无参构造函数!\n"); 12 weight = 0; 13 name = NULL; 14 } 15 Something(int w, const char* str = NULL) 16 { 17... 阅读全文
posted @ 2013-09-22 00:12
铁甲小宝
阅读(203)
评论(0)
推荐(0)
浙公网安备 33010602011771号