data_structures
Functions
bst_new.c File Reference
#include "bst.h"
+ Include dependency graph for bst_new.c:

Go to the source code of this file.

Functions

t_bstbst_new (const t_type *key_type, const t_type *val_type)
 Initializes a new empty tree. More...
 

Function Documentation

◆ bst_new()

t_bst* bst_new ( const t_type key_type,
const t_type val_type 
)

Initializes a new empty tree.

Parameters
key_typeThe type of keys
val_typeThe type of values
Returns
The new tree, or NULL on failure. In case of an error, errno is set accordingly.
Note
For this function to work, the datatype in this array must be comparable (i.e. implement the cmp function).

Definition at line 16 of file bst_new.c.