If declare an instance of class A : "A a;" which kind of memory type will it be created on? any other type of memory type?
My solution:
It depends on where it is declared. If it is a global variable, and outside any class and functions, it is on heap. If it in a class or function, it is on stack. If is in a namespace, it is on heap .
权利?