What header file can I use to get the size of ints and floats on various systems?
This is a discussion on portable way to get size of vartypes within the C++ Programming forums, part of the General Programming Boards category; What header file can I use to get the size of ints and floats on various systems?...
What header file can I use to get the size of ints and floats on various systems?
You can #include <limits> and then use std::numeric_limits. Or if you mean size in bytes, then just use sizeof.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
For the first, there's also boost.
boost::numeric_traits, that can be used in meta-programming since they're constant expressions.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^