Skip to content

data structures, collections and applications for c

Notifications You must be signed in to change notification settings

nikoloss/grandma-turner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Your Grandma's Turner

How to use

Install in Linux & Mac:

$/> mkdir build
$/> cd build
$/> cmake ..
$/> make
$/> make test
$/> sudo make install

then you will have gtlib in your system

Getting start

#include <stdio.h>
#include <stdlib.h>
#include <gt/gtstack.h>

int main(){
    GtStack* stack = gt_stack_create(10);
    gt_stack_push(stack, "顺丰");
    gt_stack_push(stack, "韵达");
    gt_stack_push(stack, "申通");
    gt_stack_push(stack, "圆通");
    GtValue p;
    int err;
    while((err=gt_stack_pop(stack, &p))==GT_STATUS_OK){
        printf("pop:%s\n", (char*)p);
    }
    gt_stack_destroy(&stack);
    return EXIT_SUCCESS;
}

compile

$ />clang main.c `pkg-config --cflags --libs gtlib`

Demo app

Dictionary

About

data structures, collections and applications for c

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published