C中的空类型定义 [英] Void type definition in c
本文介绍了C中的空类型定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在搜索处理或声明void类型的gcc库.
具体来说,我想知道指针如何在内存中获取其地址.
非常感谢...
Hello guys,
im searching for the gcc library which handles or declares the void-type.
Concretely, i would like to know how pointer get their address in the memory.
Much thanks...
推荐答案
没有特定于void
类型的库,它是语言的一部分.
至于第二个问题,指针在初始化时会得到它们的内存地址,例如:
There is no specific library for thevoid
type, it is part of the language.
As to your second question pointers get their memory address when they are initialised like:
char* pointer = new char[12];
// or
static char[] array = "abcdef";
char* pointerToArray = array;
这篇关于C中的空类型定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文