In C, if I want similar names for typename and variable,
is there any good way you can recommend me to do that?
For example, I have a struct containing a region, which
I have named it, appropriately, struct region, now when I
declare variables, I want to have the same, or a very
similar name, since I can't come up with another good name.
Now, because the different namespaces, I could declare it
struct region region.
But maybe that is obscure and bad coding practice?
Or maybe put a captial letter in the typename, like
struct Region region, or even a
typedef struct region { ... } Region. I don't know,
so I'm grateful for answers.
Thanks!
is there any good way you can recommend me to do that?
For example, I have a struct containing a region, which
I have named it, appropriately, struct region, now when I
declare variables, I want to have the same, or a very
similar name, since I can't come up with another good name.
Now, because the different namespaces, I could declare it
struct region region.
But maybe that is obscure and bad coding practice?
Or maybe put a captial letter in the typename, like
struct Region region, or even a
typedef struct region { ... } Region. I don't know,
so I'm grateful for answers.
Thanks!
Comment