摘要:
#include <iostream>#include<iomanip>#include <string>#include <sstream>#include<queue>using namespace std;bool fun(char a){ if(a=='*'||a=='/') return true; return false;}double fun1(double i,double j,char a){ if(a=='*') return i*j; else if(a==
阅读全文
posted @ 2013-02-25 19:47
叶城宇
阅读(401)
推荐(0)
编辑
摘要:
#include "stdafx.h"#include<iostream>using namespace std;#include<fstream>#include<string>typedef struct {char date; int weight; int parent,lchild,rchild;}Htnode,*huffmanTree;typedef char* * huffmancode;void fun(Htnode *p,char a,int b){ p->date=a; p->weight=b; p->
阅读全文
posted @ 2013-02-25 19:44
叶城宇
阅读(399)
推荐(0)
编辑
摘要:
//二叉树的基本操作#include<iostream>using namespace std;typedef char Telemtype;typedef struct bitnode { Telemtype date; int mark; bitnode *lchild,*rchild;}*bitree;int initbitree(bitree &T){ T=NULL; return 1; } int createbitree (bitree &T){ //按先序次序输入二叉树中节点的值(一个字符),空格字符表示空树; //构造二叉树表表示的二叉树T. cha
阅读全文
posted @ 2013-02-25 19:39
叶城宇
阅读(177)
推荐(0)
编辑
摘要:
//链表栈#include "stdafx.h"#include<iostream>using namespace std;typedef struct{ int line; int count; int dir;}Elemtype;typedef struct s{ Elemtype elem ; s* next; }s;//链表栈的结点类型为结构体;void initstack(s*&base){ base=(s*) malloc (sizeof(s)); base->next=NULL;}void push(s*&base ,Elem
阅读全文
posted @ 2013-02-25 19:37
叶城宇
阅读(241)
推荐(0)
编辑
摘要:
//循环链表.h#include "stdafx.h"#include<iostream>using namespace std;typedef int Elemtype[2] ;typedef struct l { Elemtype elem; struct l* next;}l;//链表的结点类型为结构体;l* r,*f;bool initlist(l*&a){ a=(l*)malloc(sizeof(l)); if(!a)return false; (*a).next=a;r=a;f=a; return true;}//键头结点;void link
阅读全文
posted @ 2013-02-25 19:34
叶城宇
阅读(174)
推荐(0)
编辑
摘要:
include irvine32.inc.dataa byte "abhgfu s women"b byte sizeof a dup(0).codemain proc;打印出字符串;mov edx,offset acall writestringcall crlfmov esi,offset amov edi,offset bmov ecx,(sizeof a)add esi,(sizeof a)-1mov eax,0L1: mov al, byte ptr [esi] mov [edi], eax inc edi dec esi LOOP L1mov edx ,offs
阅读全文
posted @ 2013-02-25 19:18
叶城宇
阅读(166)
推荐(0)
编辑
摘要:
include irvine32.inc.dataarray dword 10000h,20000h,30000h,20000h,10000hthesum dword ?.codearraysum proc push esipush ecxmov eax,0L1: add eax,[esi] add esi,type dword LOOP L1 pop ecx pop esi retarraysum endp main proc mov esi,offset array mov ecx,lengthof array call arraysum mov thesum,eax call wri..
阅读全文
posted @ 2013-02-25 19:17
叶城宇
阅读(132)
推荐(0)
编辑