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. how can i serialize a tree struct using c++. not use mfc

how can i serialize a tree struct using c++. not use mfc

Scheduled Pinned Locked Moved C / C++ / MFC
c++data-structuresquestion
9 Posts 6 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.
  • T Offline
    T Offline
    ttzzgg_80713
    wrote on last edited by
    #1

    thank u!:confused:

    C 1 Reply Last reply
    0
    • T ttzzgg_80713

      thank u!:confused:

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Recursively. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002

      T G P 3 Replies Last reply
      0
      • C Christian Graus

        Recursively. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002

        T Offline
        T Offline
        ttzzgg_80713
        wrote on last edited by
        #3

        can u t:confused:ell me more detail. such as find who is parent and who is child

        C 1 Reply Last reply
        0
        • C Christian Graus

          Recursively. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002

          G Offline
          G Offline
          Gary R Wheeler
          wrote on last edited by
          #4

          Seems like lots of kids waited until the end of the holiday weekend to do their homework.


          Software Zen: delete this;

          R T 2 Replies Last reply
          0
          • G Gary R Wheeler

            Seems like lots of kids waited until the end of the holiday weekend to do their homework.


            Software Zen: delete this;

            R Offline
            R Offline
            Ravi Bhavnani
            wrote on last edited by
            #5

            :-D /ravi Let's put "civil" back in "civilization" http://www.ravib.com ravib@ravib.com

            1 Reply Last reply
            0
            • C Christian Graus

              Recursively. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002

              P Offline
              P Offline
              Paul Ingles
              wrote on last edited by
              #6

              Not sure if this has been mentioned before ... Dictionary's definition of recursion: See Recursion :D -- Paul "If you can keep your head when all around you have lost theirs, then you probably haven't understood the seriousness of the situation." - David Brent, from "The Office" MS Messenger: paul@oobaloo.co.uk Sonork: 100.22446

              D 1 Reply Last reply
              0
              • G Gary R Wheeler

                Seems like lots of kids waited until the end of the holiday weekend to do their homework.


                Software Zen: delete this;

                T Offline
                T Offline
                ttzzgg_80713
                wrote on last edited by
                #7

                faint!:((

                1 Reply Last reply
                0
                • T ttzzgg_80713

                  can u t:confused:ell me more detail. such as find who is parent and who is child

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #8

                  Well, if you're recursing down every branch, then the parent is the one you just found before this one, and the child is the one you find next. Clearly if you want to rebuild a tree that you've saved to disk, you need to save not just the data, but tokens that tell you where the data goes. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002

                  1 Reply Last reply
                  0
                  • P Paul Ingles

                    Not sure if this has been mentioned before ... Dictionary's definition of recursion: See Recursion :D -- Paul "If you can keep your head when all around you have lost theirs, then you probably haven't understood the seriousness of the situation." - David Brent, from "The Office" MS Messenger: paul@oobaloo.co.uk Sonork: 100.22446

                    D Offline
                    D Offline
                    devvvy
                    wrote on last edited by
                    #9

                    i assume yr tree is just a link list. u have to arrange all items in a consecutive chunk of memory before u attempt to serialize them. and each item should have some sort of ID to identify itself (example: nLevelID - to identify the depth of an item relative to root node, nItemID - identify the relative position of an item within a given level). This is necessary so that we u read back this memory from disk, u can interpret the memory and locate individual items and reconstruct the tree. good lcuk norm

                    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