CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 25

Threaded View

  1. #18
    Join Date
    Mar 2004
    Location
    33°11'18.10"N 96°45'20.28"W
    Posts
    1,808

    Re: Size of something in bytes?

    Quote Originally Posted by TheGreatCthulhu View Post
    But, as Mutant_Fruit said, it is only the minimum amount of the required memory - there's no guarantee that the IntX type isn't using more. For example, the internal storage could initially be set to an amount that would be reasonable for most of the time (that could be way off from what your method would show for a particular value), and would only be incremented when required.
    if you read the original question:

    Quote Originally Posted by elitelogic View Post
    The sizeof operator will give me the size of the type, but that's not what I'm after. I need the size of the data in the variable.
    I interpret that to mean he is after how many bytes does the number occupy, which is what I provided.
    Last edited by MadHatter; September 25th, 2010 at 12:29 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured