Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What's the difference between C++ int and long int?
What's the difference between C++ int and long int?
(1) makes no difference under VC. Both types use 4 bytes to store data.

(2)VC is a late compiler. Before that, there were many early C compilers. Under the early compilers, long int occupied 4 bytes and int occupied 2 bytes.

(3) There are two different types of integer and long integer, which were stipulated by the inventor when the C language was born. The former stores a smaller integer range than the latter.

Don't worry about this problem, anyone can use it under VC.