From ff84705c03e06ad2f44396719253fe0fb8112171 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Thu, 21 Jan 2021 11:25:31 +0100 Subject: Updated docs. --- docs/cstack_api.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'docs/cstack_api.md') diff --git a/docs/cstack_api.md b/docs/cstack_api.md index b32e9dc5..764b258b 100644 --- a/docs/cstack_api.md +++ b/docs/cstack_api.md @@ -1,13 +1,14 @@ -# STC Container [cstack](../stc/cstack.h): Stack +# STC [cstack](../stc/cstack.h): Stack ![Stack](pics/stack.jpg) -This describes the API of the stack type **cstack**. +The **cstack** is a container adapter that gives the programmer the functionality of a stack - specifically, a LIFO (last-in, first-out) data structure. The class template acts as a wrapper to the underlying container - only a specific set of functions is provided. The stack pushes and pops the element from the back of the underlying container, known as the top of the stack. + See [std::stack](https://en.cppreference.com/w/cpp/container/stack) for a similar c++ class. ## Declaration ```c -#define using_cstack(X, ctype) +using_cstack(X, ctype) ``` The macro `using_cstack()` must be instantiated in the global scope. **cstack** uses normally a **cvec_X** or **cdeq_X** type as underlying implementation, given as `ctype`. `X` is a type tag name and will -- cgit v1.2.3