48 lines
1022 B
C++
48 lines
1022 B
C++
/*************************************************/
|
|
/*HEADERFIL LABO.H */
|
|
/*************************************************/
|
|
|
|
#ifndef _lab0_
|
|
#define _lab0_
|
|
#include <stddef.h> //för NULL
|
|
#include <assert.h> //för assert()
|
|
#include <iostream.h> //för in-ut matning
|
|
#include <conio.h> //för getch();
|
|
#include <string.h> //för säker inmatning
|
|
#include <stdlib.h> //för atoi()
|
|
|
|
const int MAXLISTA = 20;
|
|
const int BUFFERSIZE = 100;
|
|
const int FALSE=0;
|
|
const int TRUE=!FALSE;
|
|
|
|
typedef int listItemType;
|
|
struct listNode;
|
|
typedef listNode *ptrType;
|
|
|
|
class listClass
|
|
{
|
|
public:
|
|
listClass();
|
|
~listClass();
|
|
listClass(const listClass &L);
|
|
int listIsEmpty();
|
|
int listLength();
|
|
int posIsOk(position);
|
|
int newDuplicate(newItem);
|
|
void listInsert(newItem);
|
|
void listDel(position);
|
|
void listSort();
|
|
void listDisplay();
|
|
void listSeek(soktVarde);
|
|
void listIsItEmpty();
|
|
void listAntal();
|
|
private:
|
|
ptrType ptrTo(int position);
|
|
int size;
|
|
ptrType head;
|
|
};
|
|
|
|
#endif
|
|
|