How to convert a ptr value to an int in c++

前端 未结 0 1626
梦如初夏
梦如初夏 2020-12-01 17:36

In C you can do:

 int *p;
 int a;
 a = (int)p;
     

But this won\'t work in C++ "type cast cannot convert from int* to int". I hav

相关标签:
回答
  • 消灭零回复
提交回复
热议问题