dwise1_aol: Yes, you are right, memcmp takes pointers, so you don't have to deference a pointer first. Since you have shown the structs are not pointers, then you would have to pass the address of the struct with the & operator as you have shown.
3dfxMM: Yes, you are also right, structs are not pointers (as dwise1_aol has proven). Just because you will regularly use pointers to access them, or when you pass them into functions, it does not mean that structs themselves are pointers...
M.Hirsch: I would like to know why you said that strcuts are pointers? I wish to know what you were getting at. Perhaps it was the fact that they are
often
passed into functions as pointers?
I was under the impression that structs were not pointers. Then you stated that they were, so I assumed that it was yet another detail that is skipped during most explanations of structs, and that they were simply a 'hidden' pointer like arrays (in which you don't have to dereference it, since the compiler takes care of that for you, hiding the fact that it is a pointer - which, I must say, is a horrible thing for any language).
Thanks for the response, guys! |