Extra memory for variables has to be requested from the CPU, yes, but that's better than assigning memory globally - that's how memory leaks begin to occur.
I don't understand this at all.
"Extra memory for variables has to be requested from the CPU".
Could you explain this? CPU does have memory, called registers, but it's for mashine instructions only, it has nothing to do with allocated memory.
"that's better than assigning memory globally"
Who said about global variables? There is no need to use global variables at all (depends on programming language)
"that's how memory leaks begin to occur"
Doesn't make sense. There is no leak about using global variables.
C++ is object-oriented programming. There are very little functions in it. There are methods and objects mostly.
Oh and i can code in 10 programming languages.