I tried commenting line "#include <climits>". I expected that it wouldn't compile but it did. I thought climits defined the values for INT_MAX, CHAR_BIT, SHRT_MAX and others. But why did it compile. I am probably misunderstanding something; could someone explain it to me, please? Thanks!
Thanks, that's what I thought. Does that mean I don't have to include climits or is it a good idea to include it?
One last question. I opened up my iostream file and I cannot see any reference to climit. Or am I opening the wrong file? When I search for iostream files, a number of files appears iostream.h, iostream.cpp, and some with no extension. I know you're right but I just want to see it for myself. Thanks!
Then that means I don't have to include climits...
You don't have to, but it is good practice to include the headers you want and not rely on 'accidental' inclusion.
If you look in the iostream file you may find that it includes other header files, which in turn include other header files, until you finally find the one that includes climit or limit.h. The files you are interested in have no extension or a .h extension.