i_c.h
来自「本程序可以对反汇编得到的指令文件进行指令统计」· C头文件 代码 · 共 35 行
H
35 行
#include "iostream.h"
#include "fstream.h"
#include "stdlib.h"
#include "string.h"
#define NULL 0
class Node
{
char *ch;//存放指令字
int count;//计数
Node *next;//指出下一指令字的结点
public:
Node();
char* pop_ch() {return ch;}//返回结点的ch值
void set_ch(char *c);//将c的内容赋予ch
void inc_count() {count++;}//计数增1
int prt_count() {return count;}//返回计数值
void set_next(Node *c) {next=c;}//添加结点
Node* pop_next() {return next;} //返回下一结点
~Node() {delete []ch;}
};
Node::Node()
{
ch=new char[4];
count=1;
next=NULL;
}
void Node::set_ch(char *c)
{
int i;
for(i=0;i<4;i++) ch[i]=c[i];
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?