Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix README file contents #11

Merged
merged 4 commits into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,29 @@ On every write, the file is completely rewritten.

## Usage

### C++:

``` cpp
#include <cppIni/cppIni.hpp>

File ini("test.ini");
const auto intValue = init.get<int>("section", "key");
const auto intValue = ini.get<int>("section", "key");
const auto newValue = 42;
ini.set("section", "key", newValue);
```

### C:

``` c
#include <cppIni/cppIni_c.h>

void* ini = cppIni_open("test.ini");
const int intValue = cppIni_geti(ini, "section", "key");
const int newValue = 42;
cppIni_set(ini, "section", "key", newValue);
cppIni_close(&ini);
```

## License

cppIni is licensed under the MIT license. See [COPYING](https://github.com/Master92/cppIni/COPYING) for more information.
cppIni is licensed under the GPLv3. See [COPYING](https://github.com/Master92/cppIni/blob/master/COPYING) for more information.
Loading