Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Read sections names from INI file. problem.

Read sections names from INI file. problem.

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
10 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Karavaev Denis
    wrote on last edited by
    #1

    Does anybody know how to read count of the sections in INI file and them names? Thanks. ============== wasp.elcat.kg

    B A 3 Replies Last reply
    0
    • K Karavaev Denis

      Does anybody know how to read count of the sections in INI file and them names? Thanks. ============== wasp.elcat.kg

      B Offline
      B Offline
      BlackSmith
      wrote on last edited by
      #2

      Try this: http://www.codeproject.com/cpp/cinifile.asp One more tip, if you have this kind of Qs, try first in this sites search engine, almost always you'll find your answers there + source code + examples. It never failed me before...;)**

      --BlackSmith--

      **/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.

      K 1 Reply Last reply
      0
      • K Karavaev Denis

        Does anybody know how to read count of the sections in INI file and them names? Thanks. ============== wasp.elcat.kg

        A Offline
        A Offline
        Anders Molin
        wrote on last edited by
        #3

        GetPrivateProfileSection(); - Anders Money talks, but all mine ever says is "Goodbye!"

        K 1 Reply Last reply
        0
        • A Anders Molin

          GetPrivateProfileSection(); - Anders Money talks, but all mine ever says is "Goodbye!"

          K Offline
          K Offline
          Karavaev Denis
          wrote on last edited by
          #4

          Thanks

          1 Reply Last reply
          0
          • B BlackSmith

            Try this: http://www.codeproject.com/cpp/cinifile.asp One more tip, if you have this kind of Qs, try first in this sites search engine, almost always you'll find your answers there + source code + examples. It never failed me before...;)**

            --BlackSmith--

            **/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.

            K Offline
            K Offline
            Karavaev Denis
            wrote on last edited by
            #5

            Can you read? I need numbers and names of the INI. I can't find the way to do it with your class.

            1 Reply Last reply
            0
            • K Karavaev Denis

              Does anybody know how to read count of the sections in INI file and them names? Thanks. ============== wasp.elcat.kg

              B Offline
              B Offline
              BlackSmith
              wrote on last edited by
              #6

              Man, I'm only trying to help, don't get hostile...:omg: Well, another idea, try to open the INI not using registry function (FILE, CFile, istream*...). Read lines, one by one and look for '[' and ']' (use strtok, or something). Locate them and cout. That's about it. Notify me if works(or not).**

              --BlackSmith--

              **/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.

              B K 2 Replies Last reply
              0
              • B BlackSmith

                Man, I'm only trying to help, don't get hostile...:omg: Well, another idea, try to open the INI not using registry function (FILE, CFile, istream*...). Read lines, one by one and look for '[' and ']' (use strtok, or something). Locate them and cout. That's about it. Notify me if works(or not).**

                --BlackSmith--

                **/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.

                B Offline
                B Offline
                brianwelsch
                wrote on last edited by
                #7

                Jeez, I heard the slap all the way over here. You alright? ;P BW {insert witty/thought-provoking saying here}

                B 1 Reply Last reply
                0
                • B BlackSmith

                  Man, I'm only trying to help, don't get hostile...:omg: Well, another idea, try to open the INI not using registry function (FILE, CFile, istream*...). Read lines, one by one and look for '[' and ']' (use strtok, or something). Locate them and cout. That's about it. Notify me if works(or not).**

                  --BlackSmith--

                  **/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.

                  K Offline
                  K Offline
                  Karavaev Denis
                  wrote on last edited by
                  #8

                  Oh .. sorry .. I'll tryed to parse file as you said ... it works well. Thanks.

                  B 1 Reply Last reply
                  0
                  • K Karavaev Denis

                    Oh .. sorry .. I'll tryed to parse file as you said ... it works well. Thanks.

                    B Offline
                    B Offline
                    BlackSmith
                    wrote on last edited by
                    #9

                    GetPrivateProfileSection() works better? If so, silly me... I'm always trying to invent the wheel:~ I'm so high...:rolleyes:**

                    --BlackSmith--

                    **/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.

                    1 Reply Last reply
                    0
                    • B brianwelsch

                      Jeez, I heard the slap all the way over here. You alright? ;P BW {insert witty/thought-provoking saying here}

                      B Offline
                      B Offline
                      BlackSmith
                      wrote on last edited by
                      #10

                      :laugh: Are you from out of the country? :laugh:**

                      --BlackSmith--

                      **/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups