Description
iniParseThis class is a ParsingINI FileIts functions are the same as those of getprivateprofilestring in windows, allowing you to conveniently save and read configurations.
Of course, it is not only the getprivateprofilestring function, it contains the complete function set in windows.
iniParseThis effectively solves the problem of frequent hard disk reading and cross-platform reading using Windows APIs.MacAndWindowsThe compilation is successful, and its functions are also tested successfully.
Website
My personal blog: http://www.sollyu.com/ini-parser-class
Open Source Code address: https://git.oschina.net/sollyu/IniParser.git
Code
Here the simple paste code, the complete code can be referred to: http://git.oschina.net/sollyu/IniParser/blob/master/IniParserDemo/main.cpp
Void savetest (iniparser * iniprase) {struct_test struct_test_0; struct_test_0.setname ("personal blog"); struct ("http://www.sollyu.com/ini-parser-class"); struct_test struct_test_1; struct_test_1.setname ("Open Source "); struct_test_1.setlink ("https://git.oschina.net/sollyu/IniParser.git"); STD: cout <sizeof (struct_test) <STD: Endl; iniprase-> setstruct ("section_0", "Chinese", & struct_test_0, sizeof (struct_test); iniprase-> setstruct ("section_1", "English", & struct_test_1, sizeof (struct_test); iniprase-> Save ();}
Update
Reprinted Please note: sollyu blog» iniparse parsing class