mirror of
https://github.com/mariiaan/minipp.git
synced 2026-05-14 10:11:17 +02:00
Update README.md
This commit is contained in:
@@ -34,6 +34,10 @@ int main()
|
|||||||
|
|
||||||
MiniPPFile::Section* gameSection = nullptr;
|
MiniPPFile::Section* gameSection = nullptr;
|
||||||
result = root.GetSubSection("game", &gameSection);
|
result = root.GetSubSection("game", &gameSection);
|
||||||
|
// "Easy" API
|
||||||
|
int64_t test = gameSection.GetValueOrDefault<MiniPPFile::Values::IntValue>("year", 1999);
|
||||||
|
|
||||||
|
// Verbose API
|
||||||
MiniPPFile::Values::StringValue* nameValue = nullptr;
|
MiniPPFile::Values::StringValue* nameValue = nullptr;
|
||||||
result = gameSection->GetValue("name", &nameValue);
|
result = gameSection->GetValue("name", &nameValue);
|
||||||
MiniPPFile::Values::IntValue* yearValue = nullptr;
|
MiniPPFile::Values::IntValue* yearValue = nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user