Hash Code 和 Equals 的学习笔记 一. Definition 1)什么是Hash Code? hash code是一种编码方式,在Java中,每个对象都会有一个hashcode,Java可以通过这个hashcode来识别一个对象。至于hashcode的具体编码方式,比较复杂(事实上这 ...
分类:
编程语言 时间:
2018-05-21 12:46:13
阅读次数:
246
(我们知道学习C++时,在学习完C的基础内容后最先上手的就是C++的string类来学习字符串处理的内容,这里我们通过重写string类来重新认识字符串处理的内容) 1.树立string类主要函数,确立我们要实现的内容 2.代码实现 3.测试 参考: 1.http://blog.csdn.net/w ...
分类:
编程语言 时间:
2017-01-15 12:58:54
阅读次数:
229
头文件如下:#pragma once#include #include #include #include #include using namespace std;typedef int BOOL;#define FALSE 0#define TRUE 1typedef unsigned c...
分类:
其他好文 时间:
2015-12-10 13:32:47
阅读次数:
207
主要是4个默认函数的重写:
代码:
#include
using namespace std;
class Cstring{
private :
char * data;
public :
Cstring(const char * str =NULL);
Cstring(const Cstring &another);
~Cstring();
Cstring & ope...
分类:
其他好文 时间:
2014-08-08 18:13:16
阅读次数:
181