摘要:
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... 阅读全文
摘要:
线性表的基本操作: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)... 阅读全文