21 Aug, 2009, Lobotomy wrote in the 1st comment:
Votes: 0
I'm having some difficulty searching for some information regarding C++ primarily as a result of not knowing the proper terminology for what it is I'm searching for information on. Aside from that, it seems as though it could be useful to have a thread in this section for asking about C/C++ terminology and the like.

Anyhow, the term I'm looking for is this:
What do you call a variable that is declared as a non-pointer/non-reference? I.e:
Type example_variable;

I'm really hoping that the answer is not merely "variable". I also get the impression that I already know the answer somewhere in my brain, but for the life of me I just can't think of it.
21 Aug, 2009, Runter wrote in the 2nd comment:
Votes: 0
Well, the answer is variable. :P

However, certain variables could be called primitives. Such as integers. These variables are the basic building blocks for making other variable types. Such as variables that happen to be abstract data types.
21 Aug, 2009, David Haley wrote in the 3rd comment:
Votes: 0
Technically, primitives are types, and the variable is, well, just a variable. You can have a variable of a primitive type, or a variable of a more complex type.

Sometimes these are referred to as variables on the stack. Variables like this refer to locations on the stack. Everything is a "pointer", in some sense, even variables like this: they refer to some location in program memory. The difference is that a pointer refers to a location that contains another location.

I'm not entirely sure why there needs to be a special word for these other than just 'variable', though. Depending on the context, they can also be called fields, data members, etc., e.g. if they appear inside an object.
21 Aug, 2009, Tyche wrote in the 4th comment:
Votes: 0
Maybe the word you can't think of is "automatic".
21 Aug, 2009, Lobotomy wrote in the 5th comment:
Votes: 0
Runter said:
Well, the answer is variable.

David Haley said:
I'm not entirely sure why there needs to be a special word for these other than just 'variable', though.

Yes, you guys are right. "Variable" is fine; I've just been overthinking it. I appreciate everyone's help.
0.0/5