Hi friends,please help to see the following codes:
I got the following result:Code:#include <iostream> using namespace std; int main(void) { int a=4.5; char b='c'; cout<<"The data "<<a<<" stores at address "<<&a<<endl; cout<<"The data "<<b<<" stores at address "<<&b<<endl; return 0; }
/*
The data 4 stores at address 0012FF60
The data c stores at address c烫烫烫烫
*/
Why can't I get the right address for b?
I found the VC2005 compiler run the command:
00411DA3 8D 4D EF lea ecx,[b]
00411DA6 51 push ecx
where ECX==0012FF57
for &b but why shows the wrong result?
Thanks a lot for any help.