473,839 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Asking if elements in struct arre zero

If I have:

struct one_{
unsigned int one_1;
unsigned short one_2;
unsigned short one_3;
};

struct two_{
unsigned int two_1;
unsigned short two_2;
unsigned char two_3;
};

struct mystruct{
struct one_ one;
struct two_ two;
}mystruct1;

Then could I by any change ask on the value of the whole struct mystruct1,
that is all the elements in the struct in one call? I want to do something
like (in pseudo like language):

if(mystruct1 == 0) { print("All elements of mystruct1 is zero");}
Best Regards
Terry
Nov 13 '05
258 8834
> [If you haven't read the post I just made a little bit upthread, go read
it now and come back to this one.]
You're really prepared to claim that Ruth's conduct was acceptable,
and that the other people sitting at the table were wrong to object to it?


That's really creative... proof by flawed analogy to fictional story. I
like it. : )
Nov 13 '05 #111
"Roose" <no****@nospam. nospam> wrote in message
news:RM******** *********@newss vr14.news.prodi gy.com...
Do you have any evidence to back up your belief that you have irrefutable
knowledge of what I do and do not consider to be incendiary?
Well, at least you *said* so if you don't believe so, or maybe that was

one of the others in the indistinguishab le mass of anal-retentive geeks. Can't really tell.

If you don't think any of my past message was incendiary, then that last
line certainly was. So if you reply to this, then you're replying to
incendiary material.

"Richard Heathfield" <do******@addre ss.co.uk.invali d> wrote in message
news:bn******** **@sparta.btint ernet.com... Roose wrote:

<snip>
Prove that I did not post here. If you understood how Usenet works,
> you would not be able to say that my claim is false.

You, Roose, have posted to this newsgroup in exactly one thread - this

one.
My supporting evidence is the Google archive.

Are you claiming that Google has lost your articles?


Jesus Christ. I think this is like the 3rd time I've explained this.
Let's go back to the basics.


By all means.


I almost forgot, thanks for so graciously admitting you're a hypocrite by
replying.

Or do you want to retract your request for me not to top-post? You can
change your mind, I'll understand.
Nov 13 '05 #112
That's a cool story, reminds me of another story.

Once upon a time there was a group of schoolchildren in Ignorance, Montana.
They only had right-handed scissors at this school. One day a left-handed
boy was cutting out some pictures, and stabbed himself in the face with the
scissors accidently. Everyone started shouting and screaming at him, and he
died of shock, unfortunately.

Henceforth, they made two rules:

1. Only cut with your right hand.
2. Don't shout, ever.

Fast forward 15 years. Over time they forgot where these rules came from,
but they followed them anyway since they were posted on the blackboard.
They even had left-handed scissors now, but they didn't let anyone use them.
Even when they were playing Shout At The Geek, they whispered instead.

One day a boy named Roose came back from another school. Roose was
left-handed. He saw that they had left-handed scissors now, and so one day
he started cutting out some pictures with them.

All of the sudden, everyone else starting SHOUTING, "STOP CUTTING WITH YOUR
LEFT HAND." He said that he didn't mind if they were right-handed, but he
preferred cut with his left hand. Still they SHOUTED, "RIGHT-HANDED CUTTING
IS HOW WE DO THINGS 'ROUND HERE. SO STOP IT."

Roose asked how come they were shouting if one of their rules was not to
shout. They SHOUTED, "I'M NOT SHOUTING!!!!! SHOUTING IS FOR
LEFT-HANDERS!!!!! YOU'RE A SHOUTER!!!!! STOP SHOUTING, SHOUTER!!!!! STOP
CUTTING, SHOUTER!!!!! YOU'RE A LEFTY SHOUTER, CUTTER!!!!! CUT LIKE A
SHOUTER, LEFTY!!!!!"

The End.

"Dave Vandervies" <dj******@csclu b.uwaterloo.ca> wrote in message
news:bn******** **@rumours.uwat erloo.ca...
In article <3F************ ***@Sonnack.com >,
Programmer Dude <Ch***@Sonnack. com> wrote:
There is also the common phenomenon of "keyboard disconnect".
It's easy to be a jerk when you're not face to face. I'd bet good
money most of these people wouldn't **dare** to talk like that to
anyone's face.


Funny you should mention that...
There's a coffee shop near where I live at which I often get together
with a few friends and acquaintances to drink coffee and talk about
flurzling with beebles. Since we're there quite a bit, a bunch of
students and random passers-by sometimes see us there and come over
and ask questions (often related to homework the students who study
beeble theory are doing), or just pull up a chair and listen (since
beeble theory, and flurzling in general, can lead to discussions that
are quite interesting once you understand the basics). It works quite
nicely; the coffee shop provides a convenient place where we can show up
or not show up, depending on whether we have the spare time, and with a
convenient combination of a public place and implicit boundaries that
lets us carry on a discussion independently of the people at the next
table but still doesn't make us seem too threatening to people who want
to join us. Even the management of the coffee shop likes us, because we
buy a lot of coffee, and sometimes people will even come in just to ask
us a question and buy coffee while they're there (even though nowadays
most people seem to prefer going to bars and spending their money on beer
while carrying on superficial conversations with drunk people instead
of talking to a few stuffy old intellectuals in a coffee shop).

Nov 13 '05 #113
Roose wrote:
Now you're just embarassing yourself.


Not at all. Your inability (or, perhaps, unwillingness) to comprehend a
logical argument does not constitute embarrassment on /my/ part.

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #114
Roose wrote:
I almost forgot, thanks for so graciously admitting you're a hypocrite by
replying.


I did indeed reply. I have not, however, made any such admission. I don't,
of course, deny that I, in common with the rest of the human race, can be
hypocritical from time to time, but my participation in Usenet discussions
does not constitute hypocrisy, a priori.

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #115
Dave Vandervies <dj******@csclu b.uwaterloo.ca> wrote:
In article <1g************ *************** *****@BUSThotma ilE.Rcom>,
<te*********@BU SThotmailE.Rcom > wrote:
There is only a single social norm that I care about or believe to be
important.

Is what the person doing causing direct harm to my property (a person
fundamentall y owns themselves), without my consent?

If the answer is no, they, quite simply, can do whatever they feel like
doing.


Then why don't you tell us where you live, and a few CLC regulars who are
following this thread and live in the area can go follow you around for
a day telling you that if you don't like the fact that they're bothering
you you can just ignore them.


Well, if you would truly like to debate the issue, I would recommend
starting with the writings of John Locke. Understanding the Philosophy
of T. Jefferson would likely help as well.

I have set the followup to a more appropriate newsgroup.

--
Nov 13 '05 #116
Roose <no****@nospam. nospam> wrote:
Then why don't you tell us where you live, and a few CLC regulars who are
following this thread and live in the area can go follow you around for
a day telling you that if you don't like the fact that they're bothering
you you can just ignore them.


The difference being that in the real world, there is no mechanism for
ignoring someone if they follow you around in your face.


Actually, there is.

One only needs to remove oneself from the current situation where their
behavior is possible and go to one where it would not be.

Of course, should it continue, it could turn into harassment or, more
seriously, stalking, in which case, harm would exist (of the
psychological nature) and one would have the right to either defend
oneself from such harm with all appropriate force or go to the proper
authorities and have them prosecuted.

--
Nov 13 '05 #117
In article <HD************ ***@newssvr29.n ews.prodigy.com >,
Roose <no****@nospam. nospam> wrote:
[If you haven't read the post I just made a little bit upthread, go read
it now and come back to this one.]
You're really prepared to claim that Ruth's conduct was acceptable,
and that the other people sitting at the table were wrong to object to it?


That's really creative... proof by flawed analogy to fictional story. I
like it. : )


Having seen your reply to it and this claim, I have nothing further to
say on the subject.

The time has come, the poster said,
To talk of many items.
Of techie groups, and coffee shops,
Of protocol ad infinitum.
Of why the troll is finally plonked,
And why I can't rhyme the last line.
(F'rif that wasn't clear: *Plonk.*)
dave

--
Dave Vandervies dj******@csclub .uwaterloo.ca
If you need any more stupid mistakes, I'm sure I've got some round here
somewhere.
--Chris Dollin in comp.lang.c
Nov 13 '05 #118
> (F'rif that wasn't clear: *Plonk.*)

Wow. How long did that take.
Nov 13 '05 #119
On Wed, 29 Oct 2003 23:14:53 +0000, Mark McIntyre wrote:

[snips]
You said you killfiled me already,


No, I killfile you when you start telling people wrong C answers.

Isn't that about the worst possible time to killfile someone? :)
Nov 13 '05 #120

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.