What is the type of stuff ?
class Person { public: int speak() {return 1;} }; class Teacher: public Person { public: double speak() {return 0.1;} }; int main() { Teacher t; auto stuff = t.speak(); }
double
int
this code cannot compile
it's an undefined behavior