Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Why does changing the type even create another object at all?

There's no such thing as "changing the type" in c++. Function returns an object type A, your variable is of type B, compiler tries to see if there is a conversion of the value of type A to a new value of type B





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: