CompuServe Messages

C pointers

    27-Nov-92 13:31:00
Sb: #30393-C pointers
Fm: Syndesis 76004,1763
To: Steven Park 73617,3462
The way C see it, you've got one pointer called 'name' that gets initialized at compile time to point at a bit of data that happens to be a string of "Bob", while your comparison compares the value of 'name' (which was set to point at the first "Bob" string) to another DIFFERENT bit of data that happens to be another string of "Bob". With the 'strcmp()' function, you get a comparison of two strings.