C++ Constructors have no return type. Just exactly why?

前端 未结 8 903
孤独总比滥情好
孤独总比滥情好 2021-01-04 14:00

I\'ve Googled this and read many posts, but there are so many different answers that all make logical sense that I was wondering if an expert on the topic could demystify th

8条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-04 14:21

    The constructor constructs in-place, it has no need to return anything.

    I believe that all functions have to return something

    void?

提交回复
热议问题