MXVK Vulkan Framework 0.24.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
main.cpp File Reference
#include "mxvk/mxvk.hpp"
#include "mxvk/mxvk_cfg.hpp"
#include <cstdlib>
#include <iostream>
#include <string>

Go to the source code of this file.

Functions

int main (void)

Function Documentation

◆ main()

int main ( void )

Definition at line 7 of file main.cpp.

7 {
8 try {
9 mxvk::VK_Config config("test.dat");
10 auto it = config.itemAtKey("global", "key", "0");
11 auto int_value = std::strtol(it.value.c_str(), 0, 0);
12 int_value += 1;
13 std::cout << "You ran this program: " << int_value << " times.\n";
14 config.setItem("global", "key", std::to_string(int_value));
15 } catch (mxvk::Exception &e) {
16 std::cerr << std::format("Exception: {}\n", e.text());
17 return EXIT_FAILURE;
18 }
19 return EXIT_SUCCESS;
20}
std::string text() const
Parses and manages an INI-style configuration file.
Definition mxvk_cfg.hpp:36