11 2015 档案

摘要:#define _CRT_SECURE_NO_WARNINGS#include#include#includeusing namespace std;#define MAX 20typedef struct node{ struct node * nextarc; char Info;}... 阅读全文
posted @ 2015-11-29 13:04 式微胡不归 阅读(124) 评论(0) 推荐(0)
摘要:#define _CRT_SECURE_NO_WARNINGS#include#include#define MAX 20typedef struct node{ struct node * nextarc; char Info;}ArcNode,*pArcNode;typedef st... 阅读全文
posted @ 2015-11-29 09:34 式微胡不归 阅读(250) 评论(0) 推荐(0)
摘要:Matrix.h#include"Matrix.h" #includeusing namespace std;Matrix::Matrix(int r = 0,int c = 0){ row = r; column = c;}Matrix Matrix::operator+ (co... 阅读全文
posted @ 2015-11-29 08:43 式微胡不归 阅读(1365) 评论(1) 推荐(0)
摘要:#define _CRT_SECURE_NO_WARNINGS#include#include#include#define MAX 20#define INFINITY 0x7ffffffftypedef struct{ int U[MAX][MAX]; char adj[MAX][10]; in... 阅读全文
posted @ 2015-11-29 08:35 式微胡不归 阅读(145) 评论(0) 推荐(0)
摘要:#define _CRT_SECURE_NO_WARNINGS#include#include#include#includeusing namespace std;typedef struct node{ //哈夫曼树int weight;char data;int parent, lchild,... 阅读全文
posted @ 2015-11-18 19:18 式微胡不归 阅读(112) 评论(0) 推荐(0)
摘要:void traverse(pBitree root){ queueT; T.push(root); while (!T.empty()) { printf("%c", T.front()->data); if (T.front()->lchild!=NULL) T.push(T.front(... 阅读全文
posted @ 2015-11-14 11:24 式微胡不归 阅读(149) 评论(0) 推荐(0)
摘要:#define _CRT_SECURE_NO_WARNINGS#include#include#includeusing namespace std;typedef struct tree{ char data; tree *lchild; tree *rchild;}Bitree, *pBitre... 阅读全文
posted @ 2015-11-14 09:59 式微胡不归 阅读(525) 评论(0) 推荐(0)
摘要:#includevoid turn(int *&p)//加一个取地址符号,不然此指针非彼指针{ if(*p!=5) { *p+=1; turn(p); }}int main(){ int a=0; int *p=&a; turn(p); printf("%d",*p);//传入的p是一个指针 r... 阅读全文
posted @ 2015-11-14 09:54 式微胡不归 阅读(167) 评论(0) 推荐(0)
摘要:Elevator.hclass Elevator{public: Elevator(); ~Elevator(); void getNowNum(); void SetToNum(int); void SetNowNum(int); void RUN(); void set_choice(int)... 阅读全文
posted @ 2015-11-10 17:49 式微胡不归 阅读(399) 评论(0) 推荐(0)
摘要:#define _CRT_SECURE_NO_WARNINGS#include#include#includeusing namespace std;typedef struct tree{ char data; int ltag; int rtag; tree *lchild; tree *rch... 阅读全文
posted @ 2015-11-08 10:36 式微胡不归 阅读(235) 评论(0) 推荐(0)
摘要:模拟电梯载人实验Elevator.hclass Elevator{public: Elevator(); ~Elevator(); void getNowNum(); void SetToNum(int); void UP(); void DOWN();private: int NowNum; i... 阅读全文
posted @ 2015-11-08 10:32 式微胡不归 阅读(674) 评论(0) 推荐(0)
摘要:/*学号:2014329620069 姓名:张卓鹏 班级:14计科2*/#define _CRT_SECURE_NO_WARNINGS#include#include#include#include#include#include#include#includeusing namespace std... 阅读全文
posted @ 2015-11-06 10:59 式微胡不归 阅读(380) 评论(0) 推荐(0)
摘要:#include#include#include#include#includeusing namespace std;int turn_str(char s[],string str[]){ int i,j=0,k=0,count=0; for(i=0;s[i]!='\0';i++) { if((... 阅读全文
posted @ 2015-11-04 20:57 式微胡不归 阅读(198) 评论(0) 推荐(0)
摘要:#includevoid turn(char (*s)[3]){ scanf("%c",&(*++s)[0]); //修改某个值}void print(char (*s)[3]){ for(int i=0;i<3;i++) printf("%s\n",&(*s++)); //打印某一行}int m... 阅读全文
posted @ 2015-11-04 20:10 式微胡不归 阅读(927) 评论(0) 推荐(0)
摘要:#includeusing namespace std;class Singleton{private: Singleton(){ cout << "singleton construct" << endl; } static Singleton* _instance; class Cleaner ... 阅读全文
posted @ 2015-11-04 17:28 式微胡不归 阅读(141) 评论(0) 推荐(0)
摘要:#define _CRT_SECURE_NO_WARNINGS#include#include #include#includechar maze[100][100];int step[15][15];int n, m;int sm,sn,em,en;int dn[4]={ 0, 1, 0, -1 ... 阅读全文
posted @ 2015-11-04 14:31 式微胡不归 阅读(228) 评论(0) 推荐(0)
摘要:两个链表#define _CRT_SECURE_NO_WARNINGS#include#include#includestruct Student{ int Grade; char Major[50]; int Class; int ID; char Name[20]; struct Student... 阅读全文
posted @ 2015-11-04 14:29 式微胡不归 阅读(192) 评论(0) 推荐(0)
摘要:---恢复内容开始---#define _CRT_SECURE_NO_WARNINGS#include#include#includeusing namespace std;typedef struct tree{ char data; tree *lchild; tree *rchild;}Bit... 阅读全文
posted @ 2015-11-04 14:23 式微胡不归