{"id":175,"date":"2012-03-30T20:52:16","date_gmt":"2012-03-30T19:52:16","guid":{"rendered":"http:\/\/csipet.web.elte.hu\/?p=175"},"modified":"2012-03-30T20:52:16","modified_gmt":"2012-03-30T19:52:16","slug":"7-het","status":"publish","type":"post","link":"https:\/\/peter.csonka.hu\/hu\/blog\/2012\/03\/7-het\/","title":{"rendered":"7. h\u00e9t"},"content":{"rendered":"<p><a href=\"https:\/\/docs.google.com\/document\/d\/1g2RN0y2gm_-wsCdUFLFLFVf8ckdqLPndkZZXKboZ9YU\/edit\">https:\/\/docs.google.com\/document\/d\/1g2RN0y2gm_-wsCdUFLFLFVf8ckdqLPndkZZXKboZ9YU\/edit<\/a><\/p>\n<p>binfa.h:<\/p>\n<pre lang=\"c\" line=\"1\">\n#ifndef BINFA_H_INCLUDED\n#define BINFA_H_INCLUDED\n#include <iostream>\n\ntypedef char TElem;\n\nstruct BinFaElem;\n\ntypedef BinFaElem* BinFa;\n\nstruct BinFaElem {\n    TElem ertek;\n    BinFa bal;\n    BinFa jobb;\n};\n\nvoid EgyElemuFa(BinFa &f, const TElem e);\n\n#endif \/\/ BINFA_H_INCLUDED\n<\/pre>\n<p>binfa.cpp:<\/p>\n<pre lang=\"c\" line=\"1\">\n#include \"binfa.h\"\n\nvoid EgyElemuFa(BinFa &f, const TElem e){\n    f = new BinFaElem;\n    \/\/(*f).ertek = e; \/\/ ugyanaz mint az alatta levo\n    f->ertek = e;\n    f->bal = NULL;\n    f-> jobb = NULL;\n}\n<\/pre>\n<p>main.cpp:<\/p>\n<pre lang=\"c\" line=\"1\">\n#include <iostream>\n#include \"binfa.h\"\n\nusing namespace std;\n\nint main(){\n    BinFa f = NULL, f2, f3;\n    EgyElemuFa(f, 'a');\n    EgyElemuFa(f2, 'b');\n    EgyElemuFa(f3, 'c');\n    f->bal = f2;\n    f->jobb = f3;\n\n    return 0;\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/docs.google.com\/document\/d\/1g2RN0y2gm_-wsCdUFLFLFVf8ckdqLPndkZZXKboZ9YU\/edit binfa.h: #ifndef BINFA_H_INCLUDED #define BINFA_H_INCLUDED #include typedef char TElem; struct BinFaElem; typedef BinFaElem* BinFa; struct BinFaElem { TElem ertek; BinFa bal; BinFa jobb; }; void EgyElemuFa(BinFa &#038;f, const TElem e); #endif \/\/ BINFA_H_INCLUDED binfa.cpp: #include &#8222;binfa.h&#8221; void EgyElemuFa(BinFa &#038;f, const TElem e){ f = new BinFaElem; \/\/(*f).ertek = e; \/\/ ugyanaz mint az alatta levo f->ertek = e; f->bal = NULL; f-> jobb = NULL; } main.cpp: #include #include &#8222;binfa.h&#8221; using namespace std; int main(){ BinFa f = NULL, f2, f3; EgyElemuFa(f, &#8216;a&#8217;); EgyElemuFa(f2, &#8216;b&#8217;); EgyElemuFa(f3, &#8216;c&#8217;); f->bal = f2; f->jobb = f3; return 0; }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63],"tags":[],"class_list":["post-175","post","type-post","status-publish","format-standard","hentry","category-programozasi-alapismeretek-2"],"_links":{"self":[{"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/posts\/175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/comments?post=175"}],"version-history":[{"count":0,"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/posts\/175\/revisions"}],"wp:attachment":[{"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/media?parent=175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/categories?post=175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/tags?post=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}