Memory mapping of variable | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

Memory mapping of variable

I want to find the memory mapping of char, but it didn't work? https://code.sololearn.com/cd4sn3dEzO80/?ref=app

22nd Apr 2020, 11:06 AM
Saber Ahmadzai
Saber Ahmadzai - avatar
2 Réponses
0
you should cast the address to a void * to make it print what you expect: cout << static_cast<void*>(&a);
22nd Apr 2020, 11:48 AM
MO ELomari
0
u need to cast to void*
22nd Apr 2020, 11:51 AM
durian
durian - avatar