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. Serial number storing

Serial number storing

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

    What is the best way to store 1000000 serial number of 6 numbers? What type should i use? /\|-||\/|/\|)

    T M 2 Replies Last reply
    0
    • H Halawlaws

      What is the best way to store 1000000 serial number of 6 numbers? What type should i use? /\|-||\/|/\|)

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

      sorry ? what exactly is the question ?


      TOXCCT >>> GEII power
      [toxcct][VisualCalc]

      H 1 Reply Last reply
      0
      • H Halawlaws

        What is the best way to store 1000000 serial number of 6 numbers? What type should i use? /\|-||\/|/\|)

        M Offline
        M Offline
        Marc Soleda
        wrote on last edited by
        #3

        Halawlaws wrote: 1000000 serial number of 6 numbers an array of 1,000,000 elements of 6 digit each? __int16 is too short so __int32. ... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.

        K 1 Reply Last reply
        0
        • T toxcct

          sorry ? what exactly is the question ?


          TOXCCT >>> GEII power
          [toxcct][VisualCalc]

          H Offline
          H Offline
          Halawlaws
          wrote on last edited by
          #4

          I can have at max 1000000 serial number. I need to store them in an array or somth knowing that the lenght of each serial number is always 6 numbers /\|-||\/|/\|)

          1 Reply Last reply
          0
          • M Marc Soleda

            Halawlaws wrote: 1000000 serial number of 6 numbers an array of 1,000,000 elements of 6 digit each? __int16 is too short so __int32. ... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.

            K Offline
            K Offline
            knapak
            wrote on last edited by
            #5

            From the msdn website: "Note that the __int8 data type is synonymous with type char, __int16 is synonymous with type short, and __int32 is synonymous with type int". However, if you use MS VC++ on windows, the max integer value you can use with int is 32,767 if signed or twice that if unsigned. What you need is a long int that can take 2,147,483,647 or twice that if unsigned. If you need bigger values then __int64 works... partially... there seems to be a whole lot of things that are not supported for that data type in C++ but seem to work fine in C. Cheers

            M 1 Reply Last reply
            0
            • K knapak

              From the msdn website: "Note that the __int8 data type is synonymous with type char, __int16 is synonymous with type short, and __int32 is synonymous with type int". However, if you use MS VC++ on windows, the max integer value you can use with int is 32,767 if signed or twice that if unsigned. What you need is a long int that can take 2,147,483,647 or twice that if unsigned. If you need bigger values then __int64 works... partially... there seems to be a whole lot of things that are not supported for that data type in C++ but seem to work fine in C. Cheers

              M Offline
              M Offline
              Marc Soleda
              wrote on last edited by
              #6

              __intN[^] are platform independent data types, they are synonims for the ANSI data types. Cheers, Marc Soleda ... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.

              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