
watch out! Don't put a semicolon at the end of your #defines.
You'll notice here also that I frequently #define all my defined symbolic constants, so to speak, are always in all caps.
It's a convention. It's not required.
The reason generally people will use all capitals when they're #defining is just to make it really clear that this particular element of my code is a defined constant. If it was lowercase, it's possible that it might be confused with a variable. And that's probably not a good thing to do.
网友评论