Other than the extra space in the editor, is there any difference between the two statements?
EDIT: Thanks for the answers. I would also like to know how each statement is evaluated by the compiler.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No – for anything other that PODs the operators may be overloaded.
You would hope that any reasonable implementation makes these operations the same, but it is up to the developer and not enforced by the compiler.
You can imagine even more subtle problems when people overload operators such that
(A==B)is not the same as(B==A).