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. data storage

data storage

Scheduled Pinned Locked Moved C / C++ / MFC
c++databasequestion
14 Posts 5 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.
  • L Larry Mills Sr

    If you know STL, vector would handle your needs.

    A C++ programming language novice, but striving to learn

    A Offline
    A Offline
    anna mathew
    wrote on last edited by
    #5

    Thank You so much.... That Was a GREAT Answer.....

    1 Reply Last reply
    0
    • A anna mathew

      hi all.... I Need 2 Store the EMPLOYEE INFO of a COMPANY.... im not allowed to use DATABASE... what else can i use? I Can Use FILES.... Other than Files What all Can I Use... Ive To Code In VC++ MFC

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #6

      You can use of text files or use of xml files or pdf files.

      1 Reply Last reply
      0
      • L Larry Mills Sr

        If you know STL, vector would handle your needs.

        A C++ programming language novice, but striving to learn

        A Offline
        A Offline
        anna mathew
        wrote on last edited by
        #7

        When I went through STL VECTOR.... I found Another one too... That can be used for the same.... STL MAP

        L 2 Replies Last reply
        0
        • A anna mathew

          When I went through STL VECTOR.... I found Another one too... That can be used for the same.... STL MAP

          L Offline
          L Offline
          Larry Mills Sr
          wrote on last edited by
          #8

          Read the information in MSDN on the different "containers", ie, vector, list quene(MS?),map and muti-Map. Then you can make an informative decision as to which "container" will suit your needs. Enjoy!!

          A C++ programming language novice, but striving to learn

          1 Reply Last reply
          0
          • A anna mathew

            When I went through STL VECTOR.... I found Another one too... That can be used for the same.... STL MAP

            L Offline
            L Offline
            Larry Mills Sr
            wrote on last edited by
            #9

            If you email me directly (larryamillssr@hughes.net) I'll send you some production code showing you how to create a vector, use that vector, save that vector's data and how to retrieve it back and put it into a vector.

            A C++ programming language novice, but striving to learn

            A 1 Reply Last reply
            0
            • L Larry Mills Sr

              If you email me directly (larryamillssr@hughes.net) I'll send you some production code showing you how to create a vector, use that vector, save that vector's data and how to retrieve it back and put it into a vector.

              A C++ programming language novice, but striving to learn

              A Offline
              A Offline
              anna mathew
              wrote on last edited by
              #10

              It stores data only temporarily

              1 Reply Last reply
              0
              • CPalliniC CPallini

                anna mathew wrote:

                Other than Files What all Can I Use...

                PAPER. :)

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                [My articles]

                A Offline
                A Offline
                anna mathew
                wrote on last edited by
                #11

                in INI file i can store data in a proper method like in database... is there something else...i mean any other file... that can store data in a PARTICULAR FORMAT?

                CPalliniC 1 Reply Last reply
                0
                • A anna mathew

                  in INI file i can store data in a proper method like in database... is there something else...i mean any other file... that can store data in a PARTICULAR FORMAT?

                  CPalliniC Offline
                  CPalliniC Offline
                  CPallini
                  wrote on last edited by
                  #12

                  There are a lot of options, depending on many factors. You may for instance use a XML file. If you need to be compact (XML is verbose) you may choose a (custom) binary file (if you're using MFC, have a look at Serialization in MFC [^] topic. SQLite [^] being serverless, maybe another option. ... Bottom line: there are a lot of options, you've to be more detailed in your requirements to end up with the proper solution. :)

                  If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                  This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                  [My articles]

                  In testa che avete, signor di Ceprano?

                  A 1 Reply Last reply
                  0
                  • CPalliniC CPallini

                    There are a lot of options, depending on many factors. You may for instance use a XML file. If you need to be compact (XML is verbose) you may choose a (custom) binary file (if you're using MFC, have a look at Serialization in MFC [^] topic. SQLite [^] being serverless, maybe another option. ... Bottom line: there are a lot of options, you've to be more detailed in your requirements to end up with the proper solution. :)

                    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                    [My articles]

                    A Offline
                    A Offline
                    anna mathew
                    wrote on last edited by
                    #13

                    Thank you 4 your reply... XML is a good choice...but little complicated with MFC... Heard INI files is a good choice... Can u tell me how to do it? I mean HOW TO WRITE EMPLOYEE INFO OF A COMPANY to INI file..... and read it back

                    CPalliniC 1 Reply Last reply
                    0
                    • A anna mathew

                      Thank you 4 your reply... XML is a good choice...but little complicated with MFC... Heard INI files is a good choice... Can u tell me how to do it? I mean HOW TO WRITE EMPLOYEE INFO OF A COMPANY to INI file..... and read it back

                      CPalliniC Offline
                      CPalliniC Offline
                      CPallini
                      wrote on last edited by
                      #14

                      anna mathew wrote:

                      XML is a good choice...but little complicated with MFC...

                      You may use MSXML or other libraries, there are lot of them around.

                      anna mathew wrote:

                      Heard INI files is a good choice...

                      Serialization is far better. Anyway, if you want to use INI files, then you have use the functions (GetPrivateProfileInt,...) listed at the bottom of this page [^]. Check out also this article [^]. :)

                      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                      [My articles]

                      In testa che avete, signor di Ceprano?

                      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