So what is the size of an int? In the Console it says 4, but on the Summary it says 2 ( for standard int, not short)? | SoloLearn: Learn to code for FREE!

0

So what is the size of an int? In the Console it says 4, but on the Summary it says 2 ( for standard int, not short)?

4/4/2016 3:18:00 PM

Patrick White

2 Answers

New Answer

+2

The size of an int depends on your OS and if it is 32 or 64 bit. Some libs like SFML have fixed-size variables like sf::Int32. You can check the size of int by executing the following line of vode: cout<<sizeof(int);

-1

I found this quite interesting to look at http://stackoverflow.com/questions/589575/what-does-the-c-standard-state-the-size-of-int-long-type-to-be