📄 charnode.h
字号:
#ifndef CHAR_NODE_STRUCT
#define CHAR_NODE_STRUCT
#include <iostream.h>
struct CharNode
{
char ch;
int fre;
bool operator==(const CharNode & rhs)
{
return (ch==rhs.ch);
}
bool operator!=(const CharNode & rhs)
{
return (ch!=rhs.ch);
}
CharNode & operator =(const CharNode & rhs)
{
ch=rhs.ch;
fre=rhs.fre;
return *this;
}
CharNode & operator ++()
{
fre++;
return * this;
}
bool operator>(const CharNode & rhs)
{
return fre>rhs.fre;
}
friend ostream & operator<<(ostream & os,
const CharNode & node)
{
os<<node.ch<<":"<<node.fre;
return os;
}
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -