Home > Back-end >  A man squat
A man squat

Time:10-27

Code used. H or. CPP related software such as suffix storage, finally upload a student id. Rar files, and control the file size is less than 1 m,
Job title: according to the textbook for chain store list, storage structure using singly linked lists, the design must contain the following function:
Typedef int ElementType;
The class LinkList
{
Private:
The class Node
{
Public:
ElementType data;
Node * next;
The Node () : the next (0) {}//the default constructor
The Node (ElementType dataValue) : data (dataValue), next (0) {}//value constructor
};
Public:
Typedef Node * NodePointer;
LinkList ();//the constructor
LinkList (const LinkList & amp; OrigList);//copy constructor
~ LinkList ();//destructors
//void release ();
Const LinkList & amp; Operator=(const LinkList & amp; RightSide);//the assignment operator overloading
Bool empty ();//the list to empty
Void insert (ElementType dataVal, int index);//the location specified in the list insert node
Void erase (int index);//delete specify the location of the node in the linked list
NodePointer search (ElementType dataVal);//the node specified values in the table lookup chain
Void the display (ostream & amp; Out) const;//output list node values
Int nodeCount ();//computing nodes is
Void reverse ();//list the reversal of the end nodes into a linked list first node
Bool ascendingOrder ();//determine whether a linked list in ascending order
Void ListMerge (LinkList & amp; Templist);//list B incorporated into the list at the end of A void MergeList (LinkList & amp; ListA, LinkList & amp; By);//the list A and list B on the merger to list C ElementType get (NodePointer temp);
Private:
NodePointer first;//a pointer to the first node
Int mySize; The number of the//node
};
Ostream & amp; Operator<(ostream & amp; Out, const LinkList & amp; The List);//insert operator overloading (optional)
Cost & amp; Operator> (cost & amp; In, LinkList & amp; The List);//extraction operator overloading (optional)
  • Related