how to use void ** pointer correctly?

前端 未结 4 2085
滥情空心
滥情空心 2020-12-07 23:24

I am trying to use a double void pointer but I am a little bit confused about the usage. I have a struct that contains a void ** array

4条回答
  •  旧巷少年郎
    2020-12-07 23:58

    Almighty push!

    any_type x ;
    void * v = * ( void * * ) & x ;
    

    almighty pull!

    void * v ;
    any_type x = * ( any_type * ) & v ;
    

    beware of losing/gaining digits

提交回复
热议问题