mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-15 23:48:11 +08:00
🐞 fix(README.md): fix syntax errors
This commit is contained in:
13
README.md
13
README.md
@@ -23,15 +23,16 @@ toml11 is a feature-rich TOML language library for C++11/14/17/20.
|
||||
|
||||
## Example
|
||||
|
||||
```toml
|
||||
# example.toml
|
||||
title = "an example toml file"
|
||||
nums = [3, 1, 4, 1, 5] # pi!
|
||||
```
|
||||
|
||||
```cpp
|
||||
#include <toml.hpp>
|
||||
#include <iostream>
|
||||
|
||||
// ```toml
|
||||
// title = "an example toml file"
|
||||
// nums = [3, 1, 4, 1, 5] # pi!
|
||||
// ```
|
||||
|
||||
int main()
|
||||
{
|
||||
// select TOML version at runtime (optional)
|
||||
@@ -50,7 +51,7 @@ int main()
|
||||
}
|
||||
if(data.at("nums").is_array())
|
||||
{
|
||||
data.push_back(9);
|
||||
data["nums"].as_array().push_back(9);
|
||||
}
|
||||
|
||||
// check comments
|
||||
|
Reference in New Issue
Block a user