No, there is no such rule. However, there are two rules (from C99 Clause 7.1.3 Paragraph 1) that say:Originally Posted by Spiegel
- All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use.
- All identifiers that begin with an underscore are always reserved for use as identifiers with file scope in both the ordinary and tag name spaces.
A simple rule of thumb is just to avoid naming things with names that begin with an underscore.
The thing is, "something like" is not convincing. For example, compile this program:Originally Posted by Spiegel
What error do you get?Code:#include <stdio.h> typedef struct X { double a; int b; } abc_def; int main(void) { abc_def x = {1.2, 3}; printf("%f %d\n", x.a, x.b); return 0; }



5Likes
LinkBack URL
About LinkBacks



