+ 7
I don't get the address of a character variable in c++ in the following. char c; cout<<&c; Please explain why? Thanks!
3 odpowiedzi
+ 2
thanks sir!
+ 1
you should cast the address to a void * to make it print what you expect:
cout << static_cast<void*>(&a);
+ 1
cout<<(void *) &c;