Code Monkey home page Code Monkey logo

Comments (3)

benhoyt avatar benhoyt commented on July 17, 2024

Hi @19504643 william, that's a fairly general question. What do you want to do with them? Print them out, store them in a data structure, something else? If using the C version you'd have to use a handler that stored the section names and key-value pairs in a data structure, and then use that. If using the C++ version there's no way to get a list of all the section names or key-value pairs, only a way to check whether a section or key exists. (Though the C++ implementation shows how you'd use the C version to store things in a data structure.)

from inih.

19504643 avatar 19504643 commented on July 17, 2024

supporse we downloaded a very outdated configuration file from somewhere, and some sections or key-value pairs were obsolete, we could recursively traverse the file, get the sections and pairs, and pick up the useful data we needed

from inih.

benhoyt avatar benhoyt commented on July 17, 2024

Yes, it sounds like you'd need to make your handler store the section names and key-value pairs in a data structure and traverse that. Sorry, I don't have time to write example code for you right now, but hopefully that explanation and the C++ implementation points you in the right direction.

from inih.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.