本文介绍了这是什么意思 ?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有


以下代码的含义是什么


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

推荐答案









这将'fl''声明为`File *''的别名,即

作为`struct File *'的别名。


-




This declares `fl'' as an alias for `File*'', that is,
as an alias for `struct File*''.

--
Er*********@sun.com




这声明` 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


这篇关于这是什么意思 ?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 03:19