09 2012 档案

摘要:只写了一部分功能:View Code #include<stdio.h>#include<stdlib.h>#include<malloc.h>#define STACK_INIT_SIZE 100#define STACKINCREMENT 10typedef struct{ int *base; int *top; int stacksize;}SqStack;void InitStack(SqStack &S);int DestroyStack(SqStack &S);int ClearStack(SqStack &S);int 阅读全文
posted @ 2012-09-19 15:03 honging 阅读(146) 评论(0) 推荐(0) 编辑
摘要:View Code #include<stdio.h>#include<malloc.h>void Conver(char *input,char *output);void main(){ /*声明两个char指针,分配内存空间*/ char *input=(char*)malloc(sizeof(char)); char *output=(char*)malloc(sizeof(char)); /*给input指针变量赋值*/ gets(input); /*调用Conver方法*/ Conver(input,output); puts(out... 阅读全文
posted @ 2012-09-16 10:33 honging 阅读(111) 评论(0) 推荐(0) 编辑
摘要:线性表的基本操作:VS2010#include <stdio.h>#include <malloc.h>#include <system_error>typedef struct { int * elem; int Length; int Listsize;}LinerList;///初始化一个线性表 length:线性表长度void InitList(LinerList & L,int length){ if (length<0) { exit(-1); } L.elem=(int *)malloc(length*sizeof(int)... 阅读全文
posted @ 2012-09-08 11:46 honging 阅读(185) 评论(0) 推荐(0) 编辑