complier is Dev-C++ Ver 4.
Just wondering if anyone knew the max size of a regular int with this complier?
complier is Dev-C++ Ver 4.
Just wondering if anyone knew the max size of a regular int with this complier?
it depends from compiler to compiler (and also the system).. for example in DOS based 16 bit.. it is smaller than windows based.. you can use MAX_INT in limits.hOriginally posted by Thantos
thanks
>you can use MAX_INT in limits.h
I think you mean INT_MAX.
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
>you can use MAX_INT in limits.h
INT_MAX, not MAX_INT
>it depends from compiler to compiler (and also the system)..
Actually, it depends primarily on the system. C is designed to be very fast, which basically means that compiler writers are free to use the machine's natural word size for int instead of changing things in the compiler to meet language requirements. If the machine has 16 bit words, the compiler will use 16 bit words, if the machine has 32 bit words, the compiler will use 32 bit words all in the name of efficiency and simplicity on the compiler writer's part.
My best code is written with the delete key.
thanx... i thought the compilers were built based on the system ..Originally posted by Prelude
>you can use MAX_INT in limits.h
INT_MAX, not MAX_INT
>it depends from compiler to compiler (and also the system)..
Actually, it depends primarily on the system. C is designed to be very fast, which basically means that compiler writers are free to use the machine's natural word size for int instead of changing things in the compiler to meet language requirements. If the machine has 16 bit words, the compiler will use 16 bit words, if the machine has 32 bit words, the compiler will use 32 bit words all in the name of efficiency and simplicity on the compiler writer's part.