In C, a structure member may be of any type except function returning
some type, any incomplete type, any variably modified type, and void.
Hence storage class specifiers can break this rule.
No my friend,
What I wanted to know is that whether the member element of a structure can be 
assigned static storage classes....but I think after some ponderings I got my 
answer...its like this.....
 " If an element is assigned static storage class, all its objects should have 
that element as static which may not be desirable " -- its just my self 
explaination ...
Kindly mention if my reasoning is not befitting
Regards,
Debasish
Karmennevaya Dhikaraste, Maaphaaleshu Kadaachanah
||
|



----- Original Message ----
From: Christopher Carver <[EMAIL PROTECTED]>
To: [email protected]
Sent: Sunday, 23 December, 2007 8:56:10 PM
Subject: Re: [c-prog] Why are Static Structures not allowed ?



On Sun, 2007-12-23 at 10:22 +0530, debasish deka wrote:
> Hello All,
> Sorry for not typing the entire thing on the subject line.
> I want to know why " The Members of a structure can't have storage
> class specifiers, 

In C, a structure member may be of any type except function returning
some type, any incomplete type, any variably modified type, and void.
Hence storage class specifiers can break this rule.

> but Objects of the structure type can, and they apply to all of the
> members."

In this case objects of a structure is working on the structure, not the
structure members directly. 

One of the beautiful complexities of C and C++, that I too got burned on
once. I think (and hence might be wrong) that the language D addresses
this.

-- Chris

> I tried 'Googling' a few times...but not getting the reason/logic for
> it....
> Can anyone help me in this ?
> With regards,
> Debasish
> 
> Karmennevaya Dhikaraste, Maaphaaleshu Kadaachanah
> 
> Unlimited freedom, unlimited storage. Get it now, on
> http://help. yahoo.com/ l/in/yahoo/ mail/yahoomail/ tools/tools- 08.html/
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
> 
> 





      Get the freedom to save as many mails as you wish. To know how, go to 
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html

[Non-text portions of this message have been removed]

Reply via email to