Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":9540,"date":"2015-04-06T19:06:48","date_gmt":"2015-04-07T00:06:48","guid":{"rendered":"https:\/\/mauriciocoopera.withknown.com\/2015\/mastery-12"},"modified":"2015-04-06T19:06:48","modified_gmt":"2015-04-07T00:06:48","slug":"mastery-12-7","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2015\/2015\/mastery-12-7\/","title":{"rendered":"Mastery 12"},"content":{"rendered":"
\n

Creating functions in C++<\/p>\n

Functions<\/h1>\n
\n

Functions allow to structure programs in segments of code to perform individual tasks.<\/p>\n

In C++, a function is a group of statements that is given a name, and which can be called from some point of the program. The most common syntax to define a function is:<\/p>\n

type name ( parameter1, parameter2, ...) { statements }
<\/code>
Where:
– type<\/code> is the type of the value returned by the function.
– name<\/code> is the identifier by which the function can be called.
– parameters<\/code> (as many as needed): Each parameter consists of a type followed by an identifier, with each parameter being separated from the next by a comma. Each parameter looks very much like a regular variable declaration (for example:int x<\/code>), and in fact acts within the function as a regular variable which is local to the function. The purpose of parameters is to allow passing arguments to the function from the location where it is called from.
– statements<\/code> is the function’s body. It is a block of statements surrounded by braces { } that specify what the function actually does.<\/p>\n<\/section>\n

<\/section>\n

 <\/p>\n

 <\/h1>\n\n\n\n
\n
\/\/ function example<\/cite>\n#include<\/a> <iostream><\/dfn>\nusing<\/var> namespace<\/var> std;\n\nint<\/var> subtraction (int<\/var> a, int<\/var> b)\n{\n  int<\/var> r;\n  r=a-b;\n  return<\/var> r;\n}\n\nint<\/var> main ()\n{\n  int<\/var> x=5, y=3, z;\n  z = subtraction (7,2);\n  cout << \"The first result is \"<\/kbd> << z << 'n'<\/kbd>;\n  cout << \"The second result is \"<\/kbd> << subtraction (7,2) << 'n'<\/kbd>;\n  cout << \"The third result is \"<\/kbd> << subtraction (x,y) << 'n'<\/kbd>;\n  z= 4 + subtraction (x,y);\n  cout << \"The fourth result is \"<\/kbd> << z << 'n'<\/kbd>;\n}<\/code><\/pre>\n<\/td>\n
\n
The first result is 5\nThe second result is 5\nThe third result is 2\nThe fourth result is 6<\/samp><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

#TC1017<\/a> #Mastery12<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"

Creating functions in C++FunctionsFunctions allow to structure programs in segments of code to perform individual tasks.In C++, a function is a group of statements that is given a name, and which can be called from some point of the program. T… Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":115,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3,26],"tags":[330,329,324,398,328,326,399,327,95,129,40],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/9540"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/comments?post=9540"}],"version-history":[{"count":1,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/9540\/revisions"}],"predecessor-version":[{"id":9541,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/9540\/revisions\/9541"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/media?parent=9540"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/categories?post=9540"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/tags?post=9540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}