摘要: 1 #ifdef _DEBUG 2 3 #include 4 #include 5 #include 6 7 #define _BUF_SIZE 128 8 9 static const char* g_FileName = "HeapLog.txt";10 static const char* g_AllocateFail = "分配失败 --- 当前情况(分配:%d, 释放:%d)\x0a";11 static const char* g_AllocateOK = "分配成功(地址:%p, 大小:%d) --- 当前情况(分配:%d, 释放 阅读全文
posted @ 2013-06-26 22:39 herizai 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 typedef struct tagNote 5 { 6 int nNumber; 7 struct tagNote* pNext; 8 }Note; 9 bool CreateList(Note*& pListHead); 10 bool DisposeList(Note*& pListHead); 11 bool ListInsertItem(Note*& pListHead... 阅读全文
posted @ 2013-06-26 22:38 herizai 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 6 struct Node 7 { 8 int x; 9 int y; 10 struct Node *pre; 11 struct Node *next; 12 }; 13 14 struct Food 15 { 16 int x; 17 int y; 18 char c; 19 }; 20 21 void main() 22 { 23 int a[15][15]={0}; 24 int i,j... 阅读全文
posted @ 2013-06-26 22:37 herizai 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 1 #include "stdio.h" 2 #include "time.h" 3 #include "dos.h" 4 #include "windows.h" 5 #include "string.h" 6 #include "ctype.h" 7 8 int year_r(); //显示年 9 int month_h(); //月 10 int date_e(); //日 11 int time_e(); //时间 12 char * time_ta(); //将日期 阅读全文
posted @ 2013-06-26 18:55 herizai 阅读(503) 评论(0) 推荐(0) 编辑
摘要: 1 //herizai_CD1第一题 2 #include 3 #include 4 using namespace std; 5 6 void print1(int n)//输出一个正三角形 7 { 8 for(int i=0;i0;i--)//输出n行,第一行时i=1,第二行时i=2…对应下面每行*的个数22 {23 cout>choice;60 switch(choice)61 {62 case 1:print1(m);break;63 case 2:print2(m);break;64 case 3:print3(m);break;//正三角形和... 阅读全文
posted @ 2013-06-26 08:36 herizai 阅读(278) 评论(0) 推荐(0) 编辑