{"id":856,"date":"2015-11-03T10:11:12","date_gmt":"2015-11-03T10:11:12","guid":{"rendered":"http:\/\/coolt.ch\/notizen\/?p=856"},"modified":"2015-11-03T11:24:50","modified_gmt":"2015-11-03T11:24:50","slug":"defintion-member-functions","status":"publish","type":"post","link":"https:\/\/coolt.ch\/notizen\/defintion-member-functions\/","title":{"rendered":"Defintion Member functions"},"content":{"rendered":"<pre class=\"lang:sh decode:true\">class MidiData {\r\n.     public: \r\n.            \/\/ varibale\r\n.            int pin;\r\n.            double version;\r\n.            int wait;        \/\/ in ms\r\n.\r\n.            \/\/ functions\r\n.            MidiData(int pin, double version, int wait);   \r\n.            string readStream( steam io);\r\n.            string extractdata( string s);\r\n}<\/pre>\n<p>Im<a href=\"http:\/\/coolt.ch\/notizen\/class-public-and-private\/\"> <em>public<\/em>-Teil<\/a> einer Funktion, wird die member-Funktion nur <em>deklariert<\/em>. Die <strong>Definition<\/strong> folgt <strong>ausserhalb<\/strong>.<br \/>\nDas gilt auch, wenn pro Klasse eine Datei erstellt wird.<\/p>\n<p><strong>Definition Member Function<\/strong><\/p>\n<pre class=\"lang:sh decode:true\">&lt;class&gt;::&lt;member-function&gt;( &lt;type&gt; &lt;argument&gt; ) {\r\n.      \/\/ Code\r\n}<\/pre>\n<pre class=\"lang:sh decode:true\">void Date::add_day( int n){\r\n.      \/\/ Code\r\n}<\/pre>\n<pre class=\"lang:sh decode:true\">void Date:: month(){\r\n.     \/\/ Code\r\n}<\/pre>\n<p>..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>class MidiData { . public: . \/\/ varibale . int pin; . double version; . int wait; \/\/ in ms . . \/\/ functions . MidiData(int pin, double version, int wait); . string readStream( steam io); . string extractdata( string s); } Im public-Teil einer Funktion, wird die member-Funktion nur deklariert. Die Definition folgt ausserhalb. &hellip; <a href=\"https:\/\/coolt.ch\/notizen\/defintion-member-functions\/\" class=\"more-link\"><span class=\"screen-reader-text\">Defintion Member functions<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[29],"tags":[71,72],"_links":{"self":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts\/856"}],"collection":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/comments?post=856"}],"version-history":[{"count":6,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts\/856\/revisions"}],"predecessor-version":[{"id":860,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts\/856\/revisions\/860"}],"wp:attachment":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/media?parent=856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/categories?post=856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/tags?post=856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}