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 to calculate this amount?

how to calculate this amount?

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestiondata-structures
9 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.
  • G Offline
    G Offline
    gentleguy
    wrote on last edited by
    #1

    dear all i am sorry to ask such question again, i tried many time and still couldn't finish it. can anyone help me here? thanks a lot. my problem is below: just example, my real data are so huge 0 0 0 0 0 0 6 6 6 6 0 0 6 0 0 0 6 6 6 6 how to calculate each column amount 6 and then save it into .txt file as a array. thanks a lot.

    gentleguy

    I D 2 Replies Last reply
    0
    • G gentleguy

      dear all i am sorry to ask such question again, i tried many time and still couldn't finish it. can anyone help me here? thanks a lot. my problem is below: just example, my real data are so huge 0 0 0 0 0 0 6 6 6 6 0 0 6 0 0 0 6 6 6 6 how to calculate each column amount 6 and then save it into .txt file as a array. thanks a lot.

      gentleguy

      I Offline
      I Offline
      Iain Clarke Warrior Programmer
      wrote on last edited by
      #2

      Repost, as you yourself said. More than one person gave you good help yesterday. And you still don't give enough information in your question. You don't say where the data comes from. Your question implies it is in text format, but your answers yesterday imply it is an in-memory array of data. You also don't say where your actual problem is. If (as it seemed) you don't understand a simple for loop in C, then writing to a text file is the least of your problems. Asking an identical incomplete question will (at best) get identical incomplete answers. Iain.

      Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.

      G 1 Reply Last reply
      0
      • I Iain Clarke Warrior Programmer

        Repost, as you yourself said. More than one person gave you good help yesterday. And you still don't give enough information in your question. You don't say where the data comes from. Your question implies it is in text format, but your answers yesterday imply it is an in-memory array of data. You also don't say where your actual problem is. If (as it seemed) you don't understand a simple for loop in C, then writing to a text file is the least of your problems. Asking an identical incomplete question will (at best) get identical incomplete answers. Iain.

        Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.

        G Offline
        G Offline
        gentleguy
        wrote on last edited by
        #3

        i appologize to you for this case, my data is coming from the mostleft bottom corner, and then scan from this row one by one, after that go to lase-second row, also mostleft point.do you understand? sorry for that, friend.thanks a lot

        gentleguy

        I 1 Reply Last reply
        0
        • G gentleguy

          i appologize to you for this case, my data is coming from the mostleft bottom corner, and then scan from this row one by one, after that go to lase-second row, also mostleft point.do you understand? sorry for that, friend.thanks a lot

          gentleguy

          I Offline
          I Offline
          Iain Clarke Warrior Programmer
          wrote on last edited by
          #4

          gentleguy wrote:

          data is coming from

          I'll ask for the last time, first by asking a different question. me: Where does your car come from? you: It comes from the front left tire, and goes all the way to the read bumper. what you should have said: It comes from the car shop. Now, where does your data come from. Are you reading it line by line from a text file? Are you typing it in manually? Is it in some binary format? Do martians who are visiting the planet zog implant it in your computer using psychic powers? Now my psychic powers and interest are both fading, Iain.

          Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.

          R D 2 Replies Last reply
          0
          • I Iain Clarke Warrior Programmer

            gentleguy wrote:

            data is coming from

            I'll ask for the last time, first by asking a different question. me: Where does your car come from? you: It comes from the front left tire, and goes all the way to the read bumper. what you should have said: It comes from the car shop. Now, where does your data come from. Are you reading it line by line from a text file? Are you typing it in manually? Is it in some binary format? Do martians who are visiting the planet zog implant it in your computer using psychic powers? Now my psychic powers and interest are both fading, Iain.

            Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.

            R Offline
            R Offline
            Rajesh R Subramanian
            wrote on last edited by
            #5

            Iain Clarke wrote:

            you: It comes from the front left tire, and goes all the way to the read bumper.

            I love having a read bumper in my car. They are awesome. :laugh:

            Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

            I 1 Reply Last reply
            0
            • R Rajesh R Subramanian

              Iain Clarke wrote:

              you: It comes from the front left tire, and goes all the way to the read bumper.

              I love having a read bumper in my car. They are awesome. :laugh:

              Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

              I Offline
              I Offline
              Iain Clarke Warrior Programmer
              wrote on last edited by
              #6

              It's not a typo, I'm too perfect for that. From the Iain dictionary: Read bumper: A rear bumper with interesting bumper stickers. Unread bumper: A rear bumper with boring bumper stickers. Iain.

              Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.

              G 1 Reply Last reply
              0
              • I Iain Clarke Warrior Programmer

                It's not a typo, I'm too perfect for that. From the Iain dictionary: Read bumper: A rear bumper with interesting bumper stickers. Unread bumper: A rear bumper with boring bumper stickers. Iain.

                Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.

                G Offline
                G Offline
                gentleguy
                wrote on last edited by
                #7

                i showed my data examlpe in first post of this time, i thought you have seen it already, so that is why i dun meationed any more, i am sorry for that and thanks for your reply.

                gentleguy

                1 Reply Last reply
                0
                • I Iain Clarke Warrior Programmer

                  gentleguy wrote:

                  data is coming from

                  I'll ask for the last time, first by asking a different question. me: Where does your car come from? you: It comes from the front left tire, and goes all the way to the read bumper. what you should have said: It comes from the car shop. Now, where does your data come from. Are you reading it line by line from a text file? Are you typing it in manually? Is it in some binary format? Do martians who are visiting the planet zog implant it in your computer using psychic powers? Now my psychic powers and interest are both fading, Iain.

                  Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  Iain Clarke wrote:

                  Now, where does your data come from. Are you reading it line by line from a text file? Are you typing it in manually? Is it in some binary format?

                  Does this help?

                  "Love people and use things, not love things and use people." - Unknown

                  "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                  1 Reply Last reply
                  0
                  • G gentleguy

                    dear all i am sorry to ask such question again, i tried many time and still couldn't finish it. can anyone help me here? thanks a lot. my problem is below: just example, my real data are so huge 0 0 0 0 0 0 6 6 6 6 0 0 6 0 0 0 6 6 6 6 how to calculate each column amount 6 and then save it into .txt file as a array. thanks a lot.

                    gentleguy

                    D Offline
                    D Offline
                    David Crow
                    wrote on last edited by
                    #9

                    gentleguy wrote:

                    how to calculate each column amount 6...

                    The answer you need is here. Simply change 255 to 6.

                    gentleguy wrote:

                    ...and then save it into .txt file as a array. thanks

                    Work on the counting first before trying to tackle this.

                    "Love people and use things, not love things and use people." - Unknown

                    "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                    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