Which way you prefer to send arguments?-Collection of common programming errors

I tend to agree with Google’s c++ style guideline, where they request that input parameters be const references (const &), and output parameters are pointers.

void Foo(const string &in, string *out)

This gives the user an immediate pattern queue that the parameter in (above) is an input parameter, and out is an output parameter.

Originally posted 2013-11-09 22:48:43.