Obtaining C/C++ integer sizes and ranges on Linux


Posted by Diego Assencio on 2015.11.23 under Programming (C/C++)

If you need to quickly find the size and range of a given integer type in C/C++ (including char) on your architecture, there is no need to waste time writing a program that shows these values using the sizeof operator or the std::numeric_limits class template. Instead, if you use Linux, just open a terminal and run:

less /usr/include/limits.h

This file should contain all the information you need. Enjoy! :-)

Comments

No comments posted yet.