7static int file_tutorial_main(
int argc,
char **argv)
10 const char *
const file_name =
"file_tutorial.joedb";
18 db.new_city(
"Villeneuve d'Ascq");
28 db.new_city(
"Tombouctou");
37 for (
const auto city: db.get_city_table())
38 std::cout << db.get_name(city) <<
'\n';
45int main(
int argc,
char **argv)
Shortcut to directly build a Writable_Database from a file name.
Load a database from a read-only file.
@ create_new
fails if already exists, locks the file for writing
@ write_existing
fails if does not exist or locked, locks the file for writing
int main_exception_catcher(int(*main)(int, char **), int argc, char **argv)
Catch exception from main.