自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 收藏
  • 关注

原创 中序遍历线索二叉树

int InOrderTraverse(BiThrTree T){   BiThrTree p=T->lchild;   while(p!=T)   {      while(p->Ltag==Link)  p=p->lchild;     printf("%c,",p->data );  while(p->Rtag==Thread  && p->rchild!=T)  {    p=p->rch

2010-05-18 09:24:00 507

原创 线索二叉树

存储表示:typedef enum PointerTag{Link,Thread};typedef struct BiThrNode{  char data;  struct BiThrNode *lchild;struct BiThrNode *rchild;PointerTag Ltag;PointerTag Rtag;}BiThrNode,*BiThrTree; void InT

2010-05-18 09:18:00 295

原创 二叉树的建立

#include "stdio.h"#include "stdlib.h"#include "malloc.h"typedef struct BiTNode{  char data;  struct BiTNode *lchild;struct BiTNode *rchild;}BiTNode,*BiTree;char ch[]="abc##de#g##f###";//输入二叉树字符串int

2010-05-18 08:15:00 496 2

原创 OpenGL的Bezier样条曲线函数

opengl函数用来指定参数并激活Bezier曲线的显示子程序:glMap1*(GL_MAP1_VERTEX_3,uMin,uMax,stride,nPts,*ctrlpts);glEnable(GL_MAP1_VERTEX_3);用四个控制点来生成二维三次BEZIER曲线glClear(GL_COLOR_BUFFER_BIT);        //赋值的窗口显示.      gl

2010-05-17 17:20:00 646

原创 多变形扫描线算法

// aaaa.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include "gl/glut.h"#include "windows.h"const int POINTNUM=6;      //多边形点数./******定义结构体用于活性边表AET和新边表NET********

2010-05-17 16:31:00 513

转载 J2ME游戏:创建RecordStore对象

记录存储系统类在javax.microedition.rms包里,RecordStore类中包含相关应用方法。原则上在一个MIDlet中可以放置多个RecordStore,它的诸多特性如下:  RecordStore由多条记录(Record)所组成。  在MIDlet suite中每一个RecordStore的名称是唯一的,不能重复,而不同的MIDlet suite可以使用同名的RecordSto

2010-05-16 20:22:00 279

原创 J使用 RecordStore存储读取记录

转载:http://blog.csdn.net/skyge/archive/2009/05/20/4200248.aspx

2010-05-16 20:18:00 236

原创 DDA算法

// aaaa.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include "gl/glut.h"void init(void){glClearColor(1.0,1.0,1.0,0.0);//窗口的背景颜色设置为白色glMatrixMode(GL_PROJECTION);glu

2010-05-11 09:07:00 577 1

原创 绘制一条直线

// aaaa.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include "gl/glut.h"void init(void){glClearColor(1.0,1.0,1.0,0.0);//窗口的背景颜色设置为白色glMatrixMode(GL_PROJECTION);glu

2010-05-11 09:06:00 472

原创 OpenGL在VC下的应用

在VC编辑器下键入下述代码后,保存为后缀是.cpp的C++文件。开始编译,在“The build command requires an active project workspace”。“Would you like to create a default project workspace”? 的提示后,选择“是(Y)”。进入“Project”菜单,选择“Setting”项,弹出“Proje

2010-05-11 09:04:00 406

原创 链表

/* Note:Your choice is C IDE */#include #include #define ElemType int#define ERROR  -1;#define OK  1;typedef int Status;// 链表类型typedef struct Node{ ElemType data; struct Node *next;} Node, *LinkLi

2010-05-11 09:00:00 314

原创 顺序表的实现

/* Note:Your choice is C IDE */#include "stdio.h"#define INIT_SIZE 100#define INCREMENT 10typedef struct SqList { char *elem; int length;  //线性表的长度 int listsize;  //当前分配的存储量} SqList;void InitList_Sq (

2010-05-11 08:25:00 388

原创 链栈表示

#include #include #define ElemType int//链栈类型typedef struct Node{ ElemType data; //数据域 struct Node *next; //指针域}SNode, *LinkStack;//判断存储分配是否成功int MallocOK(LinkStack P){ if(P) return 1; return 0;}//

2010-05-11 08:22:00 358

原创 栈的实现和括号匹配

#include "stdio.h"#include "stdlib.h"#include "malloc.h"#include "string.h"#define STACK_INIT_SIZE 100#define INCREMENT 10typedef char ElemType;typedef struct{ElemType *base;ElemType *top;int stacksiz

2010-05-11 08:21:00 255

原创 求解n阶Hanoi塔问题的c函数

#include int Count=0;void move(char x,int n,char z){ printf(" %d. disk %d: %c => %c/n",++Count,n,x,z);}//move// 将塔座x上按直径由小到大且自上而下编号为1至n的n个圆盘按规则搬到塔座z上,y可用作辅助塔座void Hanoi(int n,char x,char y,char z)

2010-05-11 08:19:00 789

原创 串的堆分配存储表示

参考书籍:《数据结构c语言》 作者严蔚敏   /* Note:Your choice is C IDE */#include "stdio.h"typedef int Status;typedef struct{  char *ch;  int length; }HString;Status StrAssign(HString *T,char *chars){    int i=0,j=0; 

2010-05-11 08:17:00 512

原创 数组的顺序存储表示

参考书籍:    作者:严蔚敏      p93~94#include "stdio.h"#include "stdarg.h"#define MAX_ARRAY_DIM  8typedef int ElemType;typedef int Status;typedef struct{  ElemType *base;  int dim;  int *bounds;  int *constan

2010-05-11 08:10:00 452

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除