什么类型的结构? [英] What type is a structure?
问题描述
嗨
我想知道结构是什么类型的。当然,它是一个
_structure_,但是数组也不是_array_。那么什么类型的结构是什么?
?我会说一个指针,我是对的吗?
damian birchler <哒************* @ bluewin.ch>在消息中写道
news:29 ************************* @ posting.google.co m ... < blockquote class =post_quotes>嗨
我想知道结构是什么类型的。当然,它是一个_structure_,但数组也不是_array_。那么什么类型的结构呢?我会说一个指针,我是对的吗?
Nopes,结构和数组之间有一个简单的区别。想想
关于以下内容
struct Human
{
char * name;
int age;
};
现在看看
人类达米安;
人类人类[256];
结构和数组之间的* primary *区别是
结构将对象/实体表示为不同的集合
属性,这些属性可能是不同的类型{上面的达米安有不同的属性名称和年龄}。但是在数组的情况下,你的b $ b bb是一组具有相同类型的itmes。 {人类是一个
数组,每个元素类型为人类}
-
154
da ************* @ bluewin.ch (damian birchler)写道:
我想知道结构是什么类型的。当然,它是一个_structure_,但数组也不是_array_。
不是吗?这对我来说是新闻。
那么结构是什么类型的?我会说一个指针,我是对的吗?
不,结构不是指针,也不像指针。
-
我看到它的方式,一个不同意我的聪明人是
可能是我将与任何给定的人交往的最重要的人
day。
--Billy Chambless
damian birchler写道:嗨
我想知道结构是什么类型的。当然,它是一个_structure_,但数组也不是_array_。那么什么类型的结构呢?我会说一个指针,我是对的吗?
struct是一个struct是一个struct。数组是
数组是一个数组。玫瑰是玫瑰是玫瑰。
它们都不是指针是指针是一个指针。
你似乎对某些东西感到困惑基本的
问题,但我不知道它是什么。以什么方式做
你认为结构是指针,为什么你认为
数组不是数组?
-
Er*********@sun.com
Hi
I''m wondering of what type a structure is. Of course, it is a
_structure_, but an array isn''t an _array_ either. So of what type is
a structure? I''d say a pointer, am I right?
"damian birchler" <da*************@bluewin.ch> wrote in message
news:29*************************@posting.google.co m...Hi
I''m wondering of what type a structure is. Of course, it is a
_structure_, but an array isn''t an _array_ either. So of what type is
a structure? I''d say a pointer, am I right?
Nopes, there is one simple distinction between a structure and array. Think
about the following
struct Human
{
char *name;
int age;
};
Now look at
Human damian;
Human humans[256];
The *primary*distinction between a structure and an array is that a
structure represents an object/entity as a collection of different
attributes, these attributes may be of different types { above damian has
different attributes name and age }. However in case of an array what you
have is a collection of itmes each having the same type. { humans is an
array, each element of type Human }
--
154
da*************@bluewin.ch (damian birchler) writes:
I''m wondering of what type a structure is. Of course, it is a
_structure_, but an array isn''t an _array_ either.
It isn''t? That''s news to me.
So of what type is a structure? I''d say a pointer, am I right?
No, a structure is not a pointer nor is it similar to a pointer.
--
"The way I see it, an intelligent person who disagrees with me is
probably the most important person I''ll interact with on any given
day."
--Billy Chambless
damian birchler wrote:Hi
I''m wondering of what type a structure is. Of course, it is a
_structure_, but an array isn''t an _array_ either. So of what type is
a structure? I''d say a pointer, am I right?
A struct is a struct is a struct. An array is
an array is an array. A rose is a rose is a rose.
None of them is a pointer is a pointer is a pointer.
You seem to be confused on some really fundamental
matter, but I can''t tell what it is. In what way do
you think a struct is a pointer, and why do you think
an array is not an array?
--
Er*********@sun.com
这篇关于什么类型的结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!