{"id":442,"date":"2019-05-04T14:42:35","date_gmt":"2019-05-04T21:42:35","guid":{"rendered":"http:\/\/35.243.195.209\/?p=442"},"modified":"2019-05-04T14:42:35","modified_gmt":"2019-05-04T21:42:35","slug":"override-vs-overload","status":"publish","type":"post","link":"https:\/\/nanzhou.cc\/index.php\/2019\/05\/04\/override-vs-overload\/","title":{"rendered":"Override vs Overload"},"content":{"rendered":"<h2>Summary<\/h2>\n<p>In this post, I will introduce function override and function overload in C++, which are introduced by polymorphism in object oriented programming. <\/p>\n<h2>Conclusion<\/h2>\n<h3>Overload<\/h3>\n<ol>\n<li>Function overloadding achieves at compile time. <\/li>\n<li>It provides multiple definitions of the function by changing signature. Changing signatures includes changing number of parameters, change datatype of parameters. Note that return type doesn\u2019t play anyrole.<\/li>\n<li>Overloading can occur without inheritance.<\/li>\n<li>Chinese: \u65b9\u6cd5\u91cd\u8f7d.<\/li>\n<\/ol>\n<h3>Override<\/h3>\n<ol>\n<li>Function Overridding achieves at run time.<\/li>\n<li>It is the redefinition of base class function in its derived class with same signature i.e return type and parameters.<\/li>\n<li>Chinese: \u65b9\u6cd5\u91cd\u5199.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Summary In this post, I will introduce function override and function overload in C++, which are introduced by polymorphism in object oriented programming. Conclusion Overload Function overloadding achieves at compile time. It provides multiple definitions of the function by changing signature. Changing signatures includes changing number of parameters, change datatype of parameters. Note that return&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,5,25],"tags":[],"class_list":["post-442","post","type-post","status-publish","format-standard","hentry","category-c","category-proglang","category-software-engineering"],"_links":{"self":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts\/442","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/comments?post=442"}],"version-history":[{"count":1,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts\/442\/revisions"}],"predecessor-version":[{"id":443,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/posts\/442\/revisions\/443"}],"wp:attachment":[{"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/media?parent=442"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/categories?post=442"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nanzhou.cc\/index.php\/wp-json\/wp\/v2\/tags?post=442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}