CHashTable 1
Loading...
Searching...
No Matches
main.c File Reference

Interactive program to play with the HashTable. More...

#include <stdio.h>
#include <stdlib.h>
#include "hash_table/hash_table.h"
#include "interactive_mode/interactive_mode.h"
#include "fprintf_color/fprintf_color.h"
Include dependency graph for main.c:

Functions

int main (void)
 

Variables

static constexpr char WELCOME_MESSAGE []
 
static constexpr char HELP_MESSAGE []
 
static constexpr char SAVE_FILENAME [] = "interactive_mode_table.txt"
 

Detailed Description

Interactive program to play with the HashTable.

Variable Documentation

◆ HELP_MESSAGE

constexpr char HELP_MESSAGE[]
staticconstexpr
Initial value:
=
"Available commands:\n"
"- `add {key} {value}`: adds a key-value pair to the table\n"
"- `get {key}`: get a value associated to the key\n"
"- `del {key}`: deletes an entry\n"
"- `save`: saves the current table\n"
"- `load`: loads the last saved table\n"
"- `print`: prints the table\n"
"- `exit`: exits interactive mode\n"

◆ WELCOME_MESSAGE

constexpr char WELCOME_MESSAGE[]
staticconstexpr
Initial value:
=
"CHashTable Interactive mode\n"
"Type 'help' for available commands\n"