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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Static unsigned int

Static unsigned int

Scheduled Pinned Locked Moved C / C++ / MFC
algorithms
8 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.
  • J Offline
    J Offline
    Jay03
    wrote on last edited by
    #1

    Hey guys, I tried searching for static unsigned int on Google but I get a lot of gibberish answers. It would be greatly appreciated if someone can give me a brief description about it because the document im trying to understand is full of static unsigned integers Thanks:doh:

    C J T 3 Replies Last reply
    0
    • J Jay03

      Hey guys, I tried searching for static unsigned int on Google but I get a lot of gibberish answers. It would be greatly appreciated if someone can give me a brief description about it because the document im trying to understand is full of static unsigned integers Thanks:doh:

      C Offline
      C Offline
      cppcook
      wrote on last edited by
      #2

      The key here is 'static'. It tells system to allocate memory for the static variable in heap, rather than stack. So the value of the variable can be retrieved globally.

      J 1 Reply Last reply
      0
      • J Jay03

        Hey guys, I tried searching for static unsigned int on Google but I get a lot of gibberish answers. It would be greatly appreciated if someone can give me a brief description about it because the document im trying to understand is full of static unsigned integers Thanks:doh:

        J Offline
        J Offline
        Justin Tay
        wrote on last edited by
        #3

        Non-gibberish answers from google... http://www.cprogramming.com/tutorial/statickeyword.html[^] http://www.rwc.uc.edu/koehler/comath/13.html[^]

        1 Reply Last reply
        0
        • J Jay03

          Hey guys, I tried searching for static unsigned int on Google but I get a lot of gibberish answers. It would be greatly appreciated if someone can give me a brief description about it because the document im trying to understand is full of static unsigned integers Thanks:doh:

          T Offline
          T Offline
          toxcct
          wrote on last edited by
          #4

          ask a more precise question here, and you'll have concise answers... static is a keyword that have different meaning depending on the place it's used. unsigned int is a data type, and here again, can have different meaning depending on how it's used


          TOXCCT >>> GEII power

          [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

          J 1 Reply Last reply
          0
          • T toxcct

            ask a more precise question here, and you'll have concise answers... static is a keyword that have different meaning depending on the place it's used. unsigned int is a data type, and here again, can have different meaning depending on how it's used


            TOXCCT >>> GEII power

            [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

            J Offline
            J Offline
            Jorgen Sigvardsson
            wrote on last edited by
            #5

            toxcct wrote:

            unsigned int is a data type, and here again, can have different meaning depending on how it's used

            Uh, no? unsigned int is always a unsigned int.

            -- Coming Soon to an Illegal DVD

            S 1 Reply Last reply
            0
            • C cppcook

              The key here is 'static'. It tells system to allocate memory for the static variable in heap, rather than stack. So the value of the variable can be retrieved globally.

              J Offline
              J Offline
              Jorgen Sigvardsson
              wrote on last edited by
              #6

              No, static tells the compiler to allocate the memory in the static memory area. new, malloc, etc, allocate from the heap.

              -- Presented in doublevision (where drunk)

              1 Reply Last reply
              0
              • J Jorgen Sigvardsson

                toxcct wrote:

                unsigned int is a data type, and here again, can have different meaning depending on how it's used

                Uh, no? unsigned int is always a unsigned int.

                -- Coming Soon to an Illegal DVD

                S Offline
                S Offline
                super_ttd
                wrote on last edited by
                #7

                as i understand it, i think toxcct meant that it could be either used in a variable declaration/definition, type casts, function returns... but maybe it's just me, and i misunderstood :) -- TTD --

                J 1 Reply Last reply
                0
                • S super_ttd

                  as i understand it, i think toxcct meant that it could be either used in a variable declaration/definition, type casts, function returns... but maybe it's just me, and i misunderstood :) -- TTD --

                  J Offline
                  J Offline
                  Jorgen Sigvardsson
                  wrote on last edited by
                  #8

                  Maybe so..

                  -- As Foretold by Nostradamus

                  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