{"id":846,"date":"2022-08-30T15:08:09","date_gmt":"2022-08-30T15:08:09","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/which-way-you-prefer-to-send-arguments-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:08:09","modified_gmt":"2022-08-30T15:08:09","slug":"which-way-you-prefer-to-send-arguments-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/which-way-you-prefer-to-send-arguments-collection-of-common-programming-errors\/","title":{"rendered":"Which way you prefer to send arguments?-Collection of common programming errors"},"content":{"rendered":"<p>I tend to agree with Google&#8217;s c++ style guideline, where they request that input parameters be const references (const &amp;), and output parameters are pointers.<\/p>\n<pre><code>void Foo(const string &amp;in, string *out)\n<\/code><\/pre>\n<p>This gives the user an immediate pattern queue that the parameter <em>in<\/em> (above) is an input parameter, and <em>out<\/em> is an output parameter.<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-09 22:48:43. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I tend to agree with Google&#8217;s c++ style guideline, where they request that input parameters be const references (const &amp;), and output parameters are pointers. void Foo(const string &amp;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-846","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=846"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/846\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}