Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A simple cross platform INI parser written in C++

License

NotificationsYou must be signed in to change notification settings

Bufige/Lini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple cross platformINI Parser written in C++. It's made to be fast,simple,small and easy to understand.

Inside the .cpp/.h there are comments for better understanding of functions.

Ps: Comment suport wasn't added.

Simple writing example in C++##

#include<iostream>#include<lini.h>intmain(){    Linitest("..\\test.ini");if(test.Error())    {//Something went wrong        std::cout <<"Couldn't create/open the file" << std::endl;return1;    }    test.Set("Animation","Type","Animation_Name");    test.Set_Int("Animation","Speed",25);    test.Set_Int("Audio","Volume",100);    test.Set_Boolean("Levels","Stage_1",true);    test.Set_Real("Distance","Rifle",250.5);    std::cout <<"Section:" << std::endl;for(auto section : test.Get_Section())    {        std::cout << section << std::endl;    }    std::cout << std::endl <<"Keys:" << std::endl;for(auto key : test.Get_Fields("Animation"))    {        std::cout << key << std::endl;    }    test.Close();return0;}

Simple reading example in C++ using the same file.##

#include<iostream>#include<lini.h>intmain(){    Linitest("..\\test.ini");if(test.Error())    {//Something went wrong        std::cout <<"Couldn't create/open the file" << std::endl;return1;    }    std::cout << test.Get("Animation","Type") << std::endl;    std::cout << test.Get_Int("Animation","Speed") << std::endl;    std::cout << test.Get_Int("Audio","Volume") << std::endl;    std::cout << (test.Get_Boolean("Levels","Stage_1") ? ("True") : ("False")) << std::endl;    std::cout << test.Get_Real("Distance","Rifle") << std::endl;    test.Close();return0;}

About

A simple cross platform INI parser written in C++

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp