1. ## question about assigment

iam totally noob can someone tell me what the difference is? and how is it difference
Code:
``` x=5;
y==10;```

2. I've got some questions as well.

Where is your 'C' book?

Have you read it?

3. Why have you posted twice?

x=5; =>x holds the value of five (5)
y==10 => "==" represents the mathematical sign for equality(=) ,is mainly used in "if"

I hope you understand

4. Originally Posted by mouse666666
iam totally noob can someone tell me what the difference is? and how is it difference
Code:
``` x=5;
y==10;```
x = 5 ... is assignment. It places the value of 5 in the variable x.

x == 5 ... is a test for equality. It generates true if x holds the value 5 or false if it does not.

This should be very early in our C documentation.

5. Nice - enable the lazy poster to come back again with the next dumb "read the book for me" post

6. If you can't remember something that simple, it might be time to consider a different path.

7. Originally Posted by Salem
Nice - enable the lazy poster to come back again with the next dumb "read the book for me" post
Gee... sorry... I was just answering a question...

8. Yeah "totally noob" with over 90 posts and has been posting for the thick end of a year.

In other words, you really ought to have some basics sorted out by now, like where to look up things like this.

Cease Enabling Behavior
Nothing is gained from simply spoon-feeding a trivial answer that 100's of people here could have answered right away.

9. Originally Posted by Salem
Nothing is gained from simply spoon-feeding a trivial answer that 100's of people here could have answered right away.
I guess I'm just having a hard time forgetting how stuck I was on OOP until just the other day when I asked a bunch of worse than noob questions... Turns out the missing pieces were profoundly basic information... Classes are prototypes for Objects. Objects are types. They're basically structs. Messages are function calls. That kind of thing that I guess most tutorial writers figure are we should already know. I'm still beaming in gratitude for the help I got... that was amazing!

You know what... sometimes people just get stuck on something and need a little nudge.
Now if this was the 5th time in a couple of days, that might be different...

10. OOP can't be learned on page 10 of a book on C, unlike assignment vs equality.

11. Originally Posted by User Name:
OOP can't be learned on page 10 of a book on C, unlike assignment vs equality.
I take it then, you've never had some relatively simple thing blocking your way... that one fact that doesn't make any sense to you until it's explained... I can attest to how frustrating it can be... The only thing between me and learning C++ was a couple of simple facts that just somehow weren't sinking in... Once I realized that a Class is basically a struct, I was off to the races... Now on chapter 4 and learning fast... One little thing was all that was in the way.

I'm willing to give the OP the benefit of the doubt... = vs == might have been his "one little thing" and I didn't mind helping him out at all.

I'm sorry this has turned out to be controversial... I was just trying to be nice to the guy.

12. Originally Posted by CommonTater
I take it then, you've never had some relatively simple thing blocking your way... that one fact that doesn't make any sense to you until it's explained... I can attest to how frustrating it can be... The only thing between me and learning C++ was a couple of simple facts that just somehow weren't sinking in... Once I realized that a Class is basically a struct, I was off to the races... Now on chapter 4 and learning fast... One little thing was all that was in the way.

I'm willing to give the OP the benefit of the doubt... = vs == might have been his "one little thing" and I didn't mind helping him out at all.

I'm sorry this has turned out to be controversial... I was just trying to be nice to the guy.
Your response contained no more information than any resource, such as textbook or a tutorial on this website, would.

From Lesson 1: The Basics of C of the "Getting Started" tutorial of this very site.
Code:
```
a = 4 * 6; /* (Note use of comments and of semicolon) a is 24 */
a = a + 5; /* a equals the original value of a with five added to it */
a == 5     /* Does NOT assign five to a. Rather, it checks to see if a equals 5.*/```
Yes, there's been plenty of times I've been stuck very on stupid stuff. I dare say, some even worse than this. But when I have, it's after actually attempting to learn it.

I don't intend to abrade you, CommonTater, or anyone else for that matter. I'm just trying to show this is, in fact, not a reasonable question. I respect you for trying to be helpful, but sometimes that does more harm than good.

Popular pages Recent additions