Skip to content

Commit

Permalink
Fix README file contents (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Master92 authored Nov 14, 2024
2 parents caf96a0 + fa6e186 commit daeb61d
Showing 1 changed file with 16 additions and 2 deletions.
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.

0 comments on commit daeb61d

Please sign in to comment.