I like to use macro to make me code faster, especially doing a for loop from 0 to n. And I did this way:
#define For(i,n) for(int i = 0; i < n; i++)
Above code works fine, but I saw others do like this:
#define For(i,n) for(int i = 0; i < (n); i++)
The only different is they add a parenthesis. I have no idea about why they wanna add the (), I get reply from the coder and it said the purpose is to make it more safer. But I didn't get further explaination from him, and I couldn't find relates thing on web.
I simply tried doing nested loop and it is fine if without adding ().
I'm curruntly adding () when I use macro for quite long time andit didn't shows any different.
I'm curious on the exact meanng of "safer programe" and I want to know more about the risk of using macro(like hard to debug?).