G
gara.matt
Hi,
I was wondering, I've been reading some C++ code written by others,
usually libraries and stuff, and I've come across what strikes me as a
distinctive style that pervades most of the code I've been reading.
What I'm talking about is that some variables are declared with a "_"
prefix while others lack it. For example you may find a variable and
even functions like
int _temp
and one like
int temp
have, however, seen this used also in C, but not to the same degree,
and I have ignored it. But it has come to a point where I see it so
much that I think it carries some kind of significance such that if I
understood then I could grasp code quicker.
Explain away, or BS away, I'm willing to listen.
Thanks,
Matt
I was wondering, I've been reading some C++ code written by others,
usually libraries and stuff, and I've come across what strikes me as a
distinctive style that pervades most of the code I've been reading.
What I'm talking about is that some variables are declared with a "_"
prefix while others lack it. For example you may find a variable and
even functions like
int _temp
and one like
int temp
Java compiler does not accept variables of the aforementioned type. IFrom a Java perspective, this style is quite new to me, seeing as the
have, however, seen this used also in C, but not to the same degree,
and I have ignored it. But it has come to a point where I see it so
much that I think it carries some kind of significance such that if I
understood then I could grasp code quicker.
Explain away, or BS away, I'm willing to listen.
Thanks,
Matt