Is always passing by reference a bad practice?

This question already has an answer here:

  • Are there benefits of passing by pointer over passing by reference in C++? 6 answers

  • One common style is to pass input arguments by const reference, and output arguments by pointer. In this style, we don't pass output arguments by non-const reference to more clearly delineate input from output arguments.

    链接地址: http://www.djcxy.com/p/20722.html

    上一篇: 指针和参考参数之间的区别?

    下一篇: 总是通过引用传递一个不好的做法?