Allocation size of operators
Hi,
Does anyone know where I can get the max allocation size of an ''int'' for example like 8 million or 4 million. I know a ''unsigned long'' can get in the billions but does anyone know what the max size of an int is.
Thanks.
- BlueDev
#include <limits>int maxint = std::numeric_limits<int>::max();
Edit - missing semicolon.
[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ]
[edited by - Fruny on August 31, 2003 7:29:12 PM]
Thank you very much Fruny, thats excatly what I was looking for.
Edit: for those that cant get that to compile, here is the max int value:
int maxint = 2147483647;
- BlueDev
[edited by - BlueDev on August 31, 2003 9:37:20 PM]
Edit: for those that cant get that to compile, here is the max int value:
int maxint = 2147483647;
- BlueDev
[edited by - BlueDev on August 31, 2003 9:37:20 PM]
quote:Original post by BlueDev
for those that cant get that to compile, here is the max int value:
int maxint = 2147483647;
Correction: That''s the max int value on your machine. It is not the same on all computers.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement