这是什么意思 ? [英] What does it mean ?
问题描述
亲爱的所有
以下代码的含义是什么
struct file
{
void * data;
};
typedef struct文件文件;
typedef文件* fl;
感谢Jaspreet和SM Ryan澄清我之前的
querry。
预先谢谢
Ranjeet
Dear All
What does exactly below code means
struct File
{
void* data;
};
typedef struct File File;
typedef File* fl;
And thanks to Jaspreet and SM Ryan for the clarifying my previous
querry.
Thanks In advance
Ranjeet
推荐答案
ra *********** @ gmail.com 写道:
亲爱的所有
以下代码的含义是什么? />
结构文件
{
void * data;
声明一个void类型的指针,这样就可以对任何
数据类型进行类型转换。在卡片游戏中将其视为小丑。你现在不确定所有类型的数据是什么。
};
typedef struct文件文件;
typedef文件* fl;
感谢Jaspreet和SM Ryan为我以前的澄清澄清。
提前致谢
Ranjeet
Dear All
What does exactly below code means
struct File
{
void* data;
Declaring a pointer of type void so that it can then be typecast to any
data type. Consider this as a Joker in a game of cards. You are not
sure right now what all type could the data be.
};
typedef struct File File;
typedef File* fl;
And thanks to Jaspreet and SM Ryan for the clarifying my previous
querry.
Thanks In advance
Ranjeet
ra * **********@gmail.com 写道:
亲爱的所有
以下代码的含义是什么
struct file
{
void * data;
};
这声明`struct File''作为结构的类型,
包含一个名为`data'的元素,其类型是指向<的指针br />
`void''。"
typedef struct File File;
这声明`File''作为`struct File''的别名。
typedef文件* fl;
Dear All
What does exactly below code means
struct File
{
void* data;
};
This declares `struct File'' as the type of a struct that
contains one element named `data'' whose type is "pointer to
`void''."
typedef struct File File;
This declares `File'' as an alias for `struct File''.
typedef File* fl;
这将'fl''声明为`File *''的别名,即
作为`struct File *'的别名。
-
Er*********@sun.com
This declares `fl'' as an alias for `File*'', that is,
as an alias for `struct File*''.
--
Er*********@sun.com
Eric Sosman写道:
Eric Sosman wrote:
ra *********** @ gmail.com 写道:
亲爱的所有
完全在代码下面的含义是什么
结构文件
{
无效*数据;
};
Dear All
What does exactly below code means
struct File
{
void* data;
};
这声明` struct File''作为结构的类型,
包含一个名为`data'的元素,其类型为指向
`void''的指针。
This declares `struct File'' as the type of a struct that
contains one element named `data'' whose type is "pointer to
`void''."
void *指针不是指向void对象的指针,它是指向任何
对象的指针。它只是你不知道它指向什么类型的物体
!关于这个主题的讨论已在线程中进行:
" void * malloc(size_t num_bytes);"由Alawna于6月19日开始。(这个
特定的讨论出现在线程的末尾)。此外,
你的意思是什么''指向无效''?
forayer
A void * pointer isn''t a pointer to a void object, its a pointer to any
object. Its just that you dont know what type of object its pointing
to! A discussion on this topic was already carried out in the thread:
"void *malloc(size_t num_bytes);" started by Alawna on Jun 19. (This
particular discussion appears towards the end of the thread). Besides,
what do you mean by ''pointer to void''?
forayer
这篇关于这是什么意思 ?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!