Skip to content

Latest commit

 

History

History
80 lines (52 loc) · 1.08 KB

README.md

File metadata and controls

80 lines (52 loc) · 1.08 KB

HList

THIS IS CUSTOMED LINKED LIST CONTAINER LIBRARY FOR HUME SYSTEM

USAGE

1. Insert data

source

hList list;
D data(1,1);
list+data+data+data+D(3,3);
cout<<list<<endl;

output

[1,1] [1,1] [1,1] [3,3]

2. Remove Data

1) FIFO

source

cout<<list<<endl;
list--;
cout<<list<<endl;

output

[1,1] [2,2] [3,3] [4,4]
[1,1] [2,2] [3,3] 

2) LIFO

source

cout<<list<<endl;
--list;
cout<<list<<endl;

output

[1,1] [2,2] [3,3] [4,4]
[2,2] [3,3] [4,4]

3. For each

source

hList list;
list+D(1,1)+D(2,2)+D(3,3)+D(4,4);
for(E itr : list){
	cout<<itr;
}

output

[1,1] [2,2] [3,3] [4,4]

4. At, Size, Clear

source

hList list;
list+D(1,1)+D(2,2)+D(3,3)+D(4,4);
cout<<list.Size();
cout<<list[3];
list.Clear();
cout<<list.Size();

output

4
[4,4]
0