2020-11-11 01:19:49 +03:00
|
|
|
#include "sc_map.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2020-12-27 17:41:44 +03:00
|
|
|
const char *key, *value;
|
2020-11-11 01:19:49 +03:00
|
|
|
struct sc_map_str map;
|
|
|
|
|
|
|
|
sc_map_init_str(&map, 0, 0);
|
|
|
|
|
|
|
|
sc_map_put_str(&map, "jack", "chicago");
|
|
|
|
sc_map_put_str(&map, "jane", "new york");
|
|
|
|
sc_map_put_str(&map, "janie", "atlanta");
|
|
|
|
|
|
|
|
sc_map_foreach (&map, key, value) {
|
2020-12-27 17:41:44 +03:00
|
|
|
printf("Key:[%s], Value:[%s] \n", key, value);
|
|
|
|
}
|
2020-11-11 01:19:49 +03:00
|
|
|
|
|
|
|
sc_map_term_str(&map);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|