Skip to content
Snippets Groups Projects
Select Git revision
  • 9d853de0f505dca3d0fb5030c26d6b75c5232750
  • master default protected
2 results

vectors.h

Blame
  • vectors.h 628 B
    /*
        Autheur		: Abivarman KANDIAH
        Date		: 22/02/2022
        Fichier		: vectors.h
        Descritpion : Vectors functions header
    */
    
    #ifndef _VECTORS_H_
    #define _VECTORS_H_
    
    #define VECTOR_INIT_CAPACITY 4
    
    #include <stdio.h>
    #include <stdlib.h>
    #include <stdint.h>
    #include <stdbool.h>
    #include <assert.h>
    
    typedef int type;
    typedef struct vector_* vector;
    
    vector vector_create();
    int vector_length(vector vec);
    void vector_push(vector vec, type element);
    type vector_pop(vector vec);
    void vector_set(vector vec, int index, type element);
    type vector_get(vector vec, int index);
    type vector_remove(vector vec, int index);
    
    #endif