数据结构课程设计.急~

来源:百度知道 编辑:UC知道 时间:2024/05/27 15:33:00
小弟才学数据结构,学得很是不好
现在有两道设计题,很急.希望前辈帮我做下,要完整,执行能通过的,追分150分
http://tieba.baidu.com/f?kz=523522971
没有人会吗没有人会吗没有人会吗没有人会吗

源代码含有四个文件,datastruct.h是数据结构的定义;ListOper.h是线性表操作函数的声明;ListOper.cpp是线性表操作函数的定义;main.cpp是主单元含有主函数和字符串分析函数。
datastruct.h

typedef struct list
{
int c; //多项式的项数
int e; //多项式的指数
struct list *next; //下一结点
};

typedef struct list *LinkList;
typedef struct list Node;

下面是线性表的操作相关函数声明,对应文件ListOper.h:
//File: ListOper.h

#ifndef DATASTRUCT
#define DATASTRUCT
#include "datastruct.h"
#endif

//some functions declaretioin

bool CreateList(LinkList &L);
Node *CreateNode(int e, int c);
void FreeList(LinkList &L);
void SortList(LinkList &L);
void DeleteNextNode(Node *d);
void SweepNextNode(Node *s);
void OutPutList(LinkList &L);

相关函数的实现,对应文件ListOper.cpp:
//File: ListOper.cpp

#include <stdlib.h>
#include <iostream>
#ifndef DATASTRUCT
#define DATASTRUCT
#include "d