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. maximum storage in int variables

maximum storage in int variables

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
11 Posts 8 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
    asif m hmood
    wrote on last edited by
    #1

    how can i store 30 digits number in an int variable. if it is possible, then plz help me regarding this problem.

    N B K B 4 Replies Last reply
    0
    • A asif m hmood

      how can i store 30 digits number in an int variable. if it is possible, then plz help me regarding this problem.

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      Not in an int, unfortunately which is a 32 bit number. Use an __int64 [max - 18,446,744,073,709,551,615] (20 digits) Nish p.s. for 30 digits, you'd have to create your own class or struct!


      Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

      A 1 Reply Last reply
      0
      • N Nish Nishant

        Not in an int, unfortunately which is a 32 bit number. Use an __int64 [max - 18,446,744,073,709,551,615] (20 digits) Nish p.s. for 30 digits, you'd have to create your own class or struct!


        Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

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

        how to use that (__int64), it's not a data type, plz reply

        N 1 Reply Last reply
        0
        • A Anonymous

          how to use that (__int64), it's not a data type, plz reply

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #4

          You'll need the new Platform SDK or VC++.NET Nish


          Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

          T D 2 Replies Last reply
          0
          • N Nish Nishant

            You'll need the new Platform SDK or VC++.NET Nish


            Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

            T Offline
            T Offline
            Tomasz Sowinski
            wrote on last edited by
            #5

            No, __int64 is a native (but non-standard) datatype available in VC6 as well. Tomasz Sowinski -- http://www.shooltz.com

            - It's for protection
            - Protection from what? Zee Germans?

            N 1 Reply Last reply
            0
            • A asif m hmood

              how can i store 30 digits number in an int variable. if it is possible, then plz help me regarding this problem.

              B Offline
              B Offline
              benjymous
              wrote on last edited by
              #6

              Do you actually need to do mathematical operations on this number, or is it just to store it. If you just need to store, then you could put it in a string or char array -- Help me! I'm turning into a grapefruit!

              1 Reply Last reply
              0
              • T Tomasz Sowinski

                No, __int64 is a native (but non-standard) datatype available in VC6 as well. Tomasz Sowinski -- http://www.shooltz.com

                - It's for protection
                - Protection from what? Zee Germans?

                N Offline
                N Offline
                Nish Nishant
                wrote on last edited by
                #7

                Tomasz Sowinski wrote: No, __int64 is a native (but non-standard) datatype available in VC6 as well. Oh, sorry!


                Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                1 Reply Last reply
                0
                • A asif m hmood

                  how can i store 30 digits number in an int variable. if it is possible, then plz help me regarding this problem.

                  K Offline
                  K Offline
                  KarstenK
                  wrote on last edited by
                  #8

                  Do you want to store a telephone number or similar why don“t you use a string or as mentioned a selfwritten class, where you can define some operations as comparesion. Have a lot of fun:-D

                  1 Reply Last reply
                  0
                  • A asif m hmood

                    how can i store 30 digits number in an int variable. if it is possible, then plz help me regarding this problem.

                    B Offline
                    B Offline
                    Bubba2146
                    wrote on last edited by
                    #9

                    Damn that is a big number.

                    1 Reply Last reply
                    0
                    • N Nish Nishant

                      You'll need the new Platform SDK or VC++.NET Nish


                      Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                      D Offline
                      D Offline
                      Daniel Lohmann
                      wrote on last edited by
                      #10

                      Nishant S wrote: You'll need the new Platform SDK or VC++.NET Sure? I use it since good old Visual C++ 4.x day... :confused: -- Daniel Lohmann http://www.losoft.de

                      N 1 Reply Last reply
                      0
                      • D Daniel Lohmann

                        Nishant S wrote: You'll need the new Platform SDK or VC++.NET Sure? I use it since good old Visual C++ 4.x day... :confused: -- Daniel Lohmann http://www.losoft.de

                        N Offline
                        N Offline
                        Nish Nishant
                        wrote on last edited by
                        #11

                        Daniel Lohmann wrote: Sure? Sorry for the wrong info :-(


                        Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

                        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