blob: e5b6b8355c335d447a2f50b313918de797faee21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include<iostream>
int main () {
int a;
int table;
int chaise;
int b;
int *adda=&a;
int *addb=&b;
long *shift = (long*)(addb - adda);
std::cout<< adda << " et " << addb << " et " << (int)shift*sizeof(int) << std::endl;
std::cout<<"La distance en memoire ( en octets ) entre les deux variables a et b est : " << shift <<std::endl;
return 0;
}
|