int foo(type& bar); is a bad practice?
- by Earlz
Well, here we are. Yet another proposed practice that my C++ book has an opinion on. It says "a returning-value(non-void) function should not take reference types as a parameter." So basically if you were to implement a function like this:
int read_file(int& into){
...
}
and used the integer return value as some sort of error indicator…