How can I output the min value of int, char, double and so on?
I tried int_min, but that didn't seem to work.
Thanks for your help
How can I output the min value of int, char, double and so on?
I tried int_min, but that didn't seem to work.
Thanks for your help
The values in <limits.h> will give you such things as "CHAR_MAX", "CHAR_MIN", etc.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
i found those, but the problem is that I don't know how to output the to a user using printf.
Again, what have you tried? What is wrong with it?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
i tried using small =int_min, but it does not work. what would i have to put in to make the variable small take on the smallest int value.
Something along the lines of:
Code:int small = INT_MIN;
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
C & C++ (as well as many other languages) are case-sensitive, so int_min and INT_MIN are two completely different names.