git clone git@github.com:Sunrisepeak/DStruct.git
#include <iostream>
#include <dstruct.hpp> // DStruct
int main() {
dstruct::Array<int, 10> arr(2);
arr[0] = arr[-1] = 6;
for (int i = 0; i < arr.size(); i++) {
std::cout << arr[-(i + 1)] << " : " << arr[i] << std::endl;
}
return 0;
}
use compiler
-I
to include DStruct's root dir
g++ -I yourPath/DStruct HelloDStruct.cpp -o HelloDStruct && ./HelloDStruct
Lists, Stacks, Queues is ADT -- logical structure
Array and Linked-List is specific implement for Lists -- physical structure
Stacks and Queues are restricted Lists(impl by array or linked-list)
- Arrays
- Array
- Vector
- Linked-List
- EmbeddedList
- SinglyLinkedList
- DoublyLinkedList
- Stacks
- Stack
- XValueStack
- Queues
- Deque
- Queue