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. Difference among INT, INT32, LONG, LONG32...?

Difference among INT, INT32, LONG, LONG32...?

Scheduled Pinned Locked Moved C / C++ / MFC
question
15 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.
  • M Offline
    M Offline
    Maxim Zarus
    wrote on last edited by
    #1

    INT, INT32, LONG and LONG32 all are 32-bit signed integer. Then what is the main difference among them? Also I have saw other many similar data types (e.g LONGLONG, LONG64. What is the need of this difference? Any one please describe about it. Regards Maxim

    S K 2 Replies Last reply
    0
    • M Maxim Zarus

      INT, INT32, LONG and LONG32 all are 32-bit signed integer. Then what is the main difference among them? Also I have saw other many similar data types (e.g LONGLONG, LONG64. What is the need of this difference? Any one please describe about it. Regards Maxim

      S Offline
      S Offline
      SandipG
      wrote on last edited by
      #2

      This would be compiler and platform dependent.

      Regards, Sandip.

      M 1 Reply Last reply
      0
      • S SandipG

        This would be compiler and platform dependent.

        Regards, Sandip.

        M Offline
        M Offline
        Maxim Zarus
        wrote on last edited by
        #3

        I dont think so. All are used in VC++ on same compiler(VS 2005) and same platform(Windows). Please describe the difference. By the way, Thanks for your effort.:)

        S 1 Reply Last reply
        0
        • M Maxim Zarus

          I dont think so. All are used in VC++ on same compiler(VS 2005) and same platform(Windows). Please describe the difference. By the way, Thanks for your effort.:)

          S Offline
          S Offline
          SandipG
          wrote on last edited by
          #4

          see int and long both will be 4 bytes each on windows(VC++). but still they are kept as is may be for backward compatibility. If you really want the difference try to find sizes for these data types on all the windows versions for above then you will get an idea.

          Regards, Sandip.

          M 1 Reply Last reply
          0
          • S SandipG

            see int and long both will be 4 bytes each on windows(VC++). but still they are kept as is may be for backward compatibility. If you really want the difference try to find sizes for these data types on all the windows versions for above then you will get an idea.

            Regards, Sandip.

            M Offline
            M Offline
            Maxim Zarus
            wrote on last edited by
            #5

            Please tell me about all not only two. Also, I want to know about INT, INT32, LONG, LONG32 not int and long. If you can, please compare atleast these four data types. Regards, Maxim.

            C S R 3 Replies Last reply
            0
            • M Maxim Zarus

              Please tell me about all not only two. Also, I want to know about INT, INT32, LONG, LONG32 not int and long. If you can, please compare atleast these four data types. Regards, Maxim.

              C Offline
              C Offline
              CPallini
              wrote on last edited by
              #6

              Have you problems with documentation?

              If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
              This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

              M 2 Replies Last reply
              0
              • M Maxim Zarus

                Please tell me about all not only two. Also, I want to know about INT, INT32, LONG, LONG32 not int and long. If you can, please compare atleast these four data types. Regards, Maxim.

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

                i am trying to tell you only one thing is today there might not be any difference but still these will be kept as is for compatibility. Tomo with vista and 64bit machines coming in , int , long, int64 all might have 64 bit values but still they will be maintained different for compatibility.

                Regards, Sandip.

                modified on Monday, June 2, 2008 8:03 AM

                R 1 Reply Last reply
                0
                • C CPallini

                  Have you problems with documentation?

                  If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                  This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                  M Offline
                  M Offline
                  Maxim Zarus
                  wrote on last edited by
                  #8

                  No, not at all. But I am little bit confused. I am just curious to know the difference among them on same windows version with same compiler. I am talking about their uses and importance also need. I have used all in my program and not found any difference. That is why I am asking here. Because you all are experienced and experts. Please guide me. Sorry, If i am wrong or rude anywhere. Regards, Maxim.

                  1 Reply Last reply
                  0
                  • C CPallini

                    Have you problems with documentation?

                    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                    M Offline
                    M Offline
                    Maxim Zarus
                    wrote on last edited by
                    #9

                    Sir, Can I know the reason of down voted? Is my way of asking question is not right? I am new here in this forum. I was just trying to explain me before all of you...:) Thanks. Maxim.

                    C 1 Reply Last reply
                    0
                    • M Maxim Zarus

                      Please tell me about all not only two. Also, I want to know about INT, INT32, LONG, LONG32 not int and long. If you can, please compare atleast these four data types. Regards, Maxim.

                      R Offline
                      R Offline
                      Rajkumar R
                      wrote on last edited by
                      #10

                      some info [What's the difference between int and INT, long and LONG, etc? ^] and type suffixed with number of bits like INT32, INT16, ... is typedefed to guaranteed the number of bits it uses, say INT32 is sure to store 32 bit value, while INT is not; depends on platform.

                      S M 2 Replies Last reply
                      0
                      • S SandipG

                        i am trying to tell you only one thing is today there might not be any difference but still these will be kept as is for compatibility. Tomo with vista and 64bit machines coming in , int , long, int64 all might have 64 bit values but still they will be maintained different for compatibility.

                        Regards, Sandip.

                        modified on Monday, June 2, 2008 8:03 AM

                        R Offline
                        R Offline
                        Rajkumar R
                        wrote on last edited by
                        #11

                        SandipG wrote:

                        Tomo with vista and 64bit machines coming in , int int32 int64 all might have 64 bit

                        if int32 have 64 bit then it is meaningless.

                        1 Reply Last reply
                        0
                        • R Rajkumar R

                          some info [What's the difference between int and INT, long and LONG, etc? ^] and type suffixed with number of bits like INT32, INT16, ... is typedefed to guaranteed the number of bits it uses, say INT32 is sure to store 32 bit value, while INT is not; depends on platform.

                          S Offline
                          S Offline
                          SandipG
                          wrote on last edited by
                          #12

                          I will change my reply but i am not saying it i just took it as an example.

                          Regards, Sandip.

                          1 Reply Last reply
                          0
                          • R Rajkumar R

                            some info [What's the difference between int and INT, long and LONG, etc? ^] and type suffixed with number of bits like INT32, INT16, ... is typedefed to guaranteed the number of bits it uses, say INT32 is sure to store 32 bit value, while INT is not; depends on platform.

                            M Offline
                            M Offline
                            Maxim Zarus
                            wrote on last edited by
                            #13

                            Helpful link. Thanks. And your answer is also very supportive. Giving you 5 votes...:)

                            1 Reply Last reply
                            0
                            • M Maxim Zarus

                              INT, INT32, LONG and LONG32 all are 32-bit signed integer. Then what is the main difference among them? Also I have saw other many similar data types (e.g LONGLONG, LONG64. What is the need of this difference? Any one please describe about it. Regards Maxim

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

                              The difference on the windows platform isnt there, but if you use the source-code on other platforms or other compilers than from MS there 'maybe' differences.:~ But LONGLONG, LONG64 are resolved to 64-bit data on WIN64 so there can stroe 64-bit data!!!

                              Greetings from Germany

                              1 Reply Last reply
                              0
                              • M Maxim Zarus

                                Sir, Can I know the reason of down voted? Is my way of asking question is not right? I am new here in this forum. I was just trying to explain me before all of you...:) Thanks. Maxim.

                                C Offline
                                C Offline
                                CPallini
                                wrote on last edited by
                                #15

                                I can only guess (since I didn't down vote you): possibly your post appeared a bit rude. :)

                                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                                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