What is a base type?
I presume it's the type before the variable name
Ex. Int x = 10;
The int is the base type
If I'm wrong please correct me.
Thank you
As we’ve seen, a variable definition consists of a base type and a list of declarators. Each declarator can relate its variable to the base type differently from the other declarators in the same definition. Thus, a single definition might define variables of different types
There is no such notion as the base type in C++. There are such notions as type specifiers and declarators. In your example int is a simple type specifier. x and *px are declarators.
The name of the book is given above as c++ primer fifth edition.
So the authors are apparently Stanley B. Lippman, Josée Lajoie, and Barbara E. Moo
I think the authors are using the word base in a looser sense than it has in base class. e.g. base type = the type on which things are based, rather than the type that is inherited from (or whatever.)
It is prob a bit of an unfortunate choice, given the resonance between "base class" and "base type". But what word could be used here instead, to make it clear that the types of the variables can differ from the "original" type? You can't switch to simple (or fundamental, basic, ...) as you can base your declarations on compound types as well.