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. can you tell me what is that mean??

can you tell me what is that mean??

Scheduled Pinned Locked Moved C / C++ / MFC
question
10 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.
  • A Offline
    A Offline
    Asmoa
    wrote on last edited by
    #1

    I'm making a huge assignment and a part of it want me to see the wasted space in a file a friend of me said to me to use system("cls"); what is the meaning of system("cls"); ???

    no gain without pain

    J A D 3 Replies Last reply
    0
    • A Asmoa

      I'm making a huge assignment and a part of it want me to see the wasted space in a file a friend of me said to me to use system("cls"); what is the meaning of system("cls"); ???

      no gain without pain

      J Offline
      J Offline
      jeron1
      wrote on last edited by
      #2

      This is a call to the OS to clear screen. If you typed in cls at the command prompt, the OS would attempt to clear the screen. Not sure what 'wasted space in a file' is though.

      D 1 Reply Last reply
      0
      • A Asmoa

        I'm making a huge assignment and a part of it want me to see the wasted space in a file a friend of me said to me to use system("cls"); what is the meaning of system("cls"); ???

        no gain without pain

        A Offline
        A Offline
        Asmoa
        wrote on last edited by
        #3

        i mean with that the un used space in the all the records

        no gain without pain

        J 1 Reply Last reply
        0
        • A Asmoa

          i mean with that the un used space in the all the records

          no gain without pain

          J Offline
          J Offline
          jeron1
          wrote on last edited by
          #4

          Well in any case I can't see what "cls" has to do with anything related to a file.

          H 1 Reply Last reply
          0
          • J jeron1

            Well in any case I can't see what "cls" has to do with anything related to a file.

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

            You can use of cls for clear page of course it was for DOS for example on the GWBasic you could use of clrcls (Im not sure excatly) what do you need excatly?

            1 Reply Last reply
            0
            • J jeron1

              This is a call to the OS to clear screen. If you typed in cls at the command prompt, the OS would attempt to clear the screen. Not sure what 'wasted space in a file' is though.

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

              jeron1 wrote:

              Not sure what 'wasted space in a file' is though.

              Also known as slack space.

              "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
              • A Asmoa

                I'm making a huge assignment and a part of it want me to see the wasted space in a file a friend of me said to me to use system("cls"); what is the meaning of system("cls"); ???

                no gain without pain

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

                Asmo'a wrote:

                I'm making a huge assignment and a part of it want me to see the wasted space in a file

                As I understand your question, you want to "see" the amount of slack space a file uses. For example, if you have a file that is 8,200 bytes in size, it will actually consume 12,288 bytes on disk. That extra 4,088 bytes is wasted, or slack, space. This, of course, assumes a 4KB allocation unit.

                "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

                N 1 Reply Last reply
                0
                • D David Crow

                  Asmo'a wrote:

                  I'm making a huge assignment and a part of it want me to see the wasted space in a file

                  As I understand your question, you want to "see" the amount of slack space a file uses. For example, if you have a file that is 8,200 bytes in size, it will actually consume 12,288 bytes on disk. That extra 4,088 bytes is wasted, or slack, space. This, of course, assumes a 4KB allocation unit.

                  "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

                  N Offline
                  N Offline
                  Nelek
                  wrote on last edited by
                  #8

                  And why is that slack space there? Because in almost all the files I have seen, when seeing properties size and consumed place are different. Is it something standard? or can be avoided?

                  Greetings. -------- M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson

                  D 1 Reply Last reply
                  0
                  • N Nelek

                    And why is that slack space there? Because in almost all the files I have seen, when seeing properties size and consumed place are different. Is it something standard? or can be avoided?

                    Greetings. -------- M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson

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

                    Nelek wrote:

                    And why is that slack space there?

                    See here.

                    "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

                    N 1 Reply Last reply
                    0
                    • D David Crow

                      Nelek wrote:

                      And why is that slack space there?

                      See here.

                      "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

                      N Offline
                      N Offline
                      Nelek
                      wrote on last edited by
                      #10

                      Thanks for the link

                      Greetings. -------- M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson

                      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