{"id":314,"date":"2012-05-05T21:57:01","date_gmt":"2012-05-06T01:57:01","guid":{"rendered":"http:\/\/templesystems.com\/?page_id=314"},"modified":"2012-05-05T21:57:01","modified_gmt":"2012-05-06T01:57:01","slug":"operator-overloading-c","status":"publish","type":"page","link":"https:\/\/templesystems.com\/?page_id=314","title":{"rendered":"Operator Overloading C++"},"content":{"rendered":"<p>In a C++ class, it is possible to change the functionality of operators to suit the needs of the class. \u00a0This is called &#8220;Operator Overloading&#8221;. \u00a0Operators that can be overloaded include +, -, *, \/, +=, -=, *=, \/=, ==, &lt;, &gt;, &lt;=, &gt;=, !=, and a number of others. \u00a0There are actually only a few operators that can&#8217;t be overloaded.<\/p>\n<p>A situation where overloading might be used would be a vector class. \u00a0A vector class might have member variables for x, y, and z. \u00a0When two vectors are added, the x, y, and z values should be summed. \u00a0The + operator could be overloaded, so that the x, y, and z member variables get added together when two vectors are added.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a C++ class, it is possible to change the functionality of operators to suit the needs of the class. \u00a0This is called &#8220;Operator Overloading&#8221;. \u00a0Operators that can be overloaded include +, -, *, \/, +=, -=, *=, \/=, ==, &hellip; <a href=\"https:\/\/templesystems.com\/?page_id=314\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":303,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-314","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/templesystems.com\/index.php?rest_route=\/wp\/v2\/pages\/314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/templesystems.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/templesystems.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/templesystems.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/templesystems.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=314"}],"version-history":[{"count":2,"href":"https:\/\/templesystems.com\/index.php?rest_route=\/wp\/v2\/pages\/314\/revisions"}],"predecessor-version":[{"id":316,"href":"https:\/\/templesystems.com\/index.php?rest_route=\/wp\/v2\/pages\/314\/revisions\/316"}],"up":[{"embeddable":true,"href":"https:\/\/templesystems.com\/index.php?rest_route=\/wp\/v2\/pages\/303"}],"wp:attachment":[{"href":"https:\/\/templesystems.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}