learning c ++ I discovered that a type is defined by a class, and we can also write our own operators for that type. my question i: is there a definition for primitive types provided by the language? such as the type int?
how these types are implemented as compared to a string type, for example?
Primitives are implemented in the hardware. Operations between primitives are implemented by generating code that changes the state of hardware registers in a manner consistent with what the language exposes. For example,
a = b + c;
might translate to
1 2 3 4 5 6 7
push 0xFC
push 0x100
load
push 0x104
load
add
store