虚空**通用指针? [英] Void ** a generic pointer?

查看:155
本文介绍了虚空**通用指针?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无效* 是一个通用的指针,但对于无效** ?为无效** 也是一个通用指针?

void * is a generic pointer, but what about void **? Is void ** also a generic pointer?

我们可以强制转换无效** INT ** 的char ** 等。

Can we typecast void ** to int **, char ** and so on.

我会很感激堆栈溢出家庭有这方面的信息。

I would be thankful to stack overflow family for any information on this.

推荐答案

没有。 无效** 是一个指向无效* ,没有别的。只有无效* 就像一个普通的指针。

No. void** is a pointer to void*, and nothing else. Only void* acts like a generic pointer.

注意,实际上是想它可能会产生一致的结果,但只有上述被授权的标准,别的是未定义行为,不怜悯可能会崩溃。

Note that actually trying it will probably yield consistent results, but only the above is mandated by the Standard, anything else is Undefined Behaviour and may crash without mercy.

这篇关于虚空**通用指针?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆