Ok, this isn't really c++, but that is the language I'm working with. Basically I am suppose to determine how many bytes my compiler is using for each data type(i.e. int, double, char, etc..). So I'm printing my memory addresses out for example:
Address of si1: 0012FF60
Address of si2: 0012FF54
those are 2 short ints that were defined back to back in my program. Now cleary I can tell the difference of 4 bytes, which means my compiler is using 4 bytes of memory for a short int. Now the problem comes in when I get memory address such as
Address of boolVar1: 0012FEB7
Address of boolVar2: 0012FEAB
Now, I know A = 10 in decimal and B = 11, I'm not sure if that is where I should be looking, but how do I determine the difference in bytes between these 2 memory addresses?
Help is much appreciated!