{"id":788,"date":"2009-11-25T18:50:36","date_gmt":"2009-11-25T18:50:36","guid":{"rendered":"http:\/\/pchero21.com\/?p=788"},"modified":"2009-11-25T18:50:36","modified_gmt":"2009-11-25T18:50:36","slug":"%ed%95%a8%ec%88%98-%ec%9d%b4%eb%a6%84%ec%9d%84-%ed%8f%ac%ec%9d%b8%ed%84%b0%ec%97%90-%ed%95%a0%eb%8b%b9%ed%95%98%ec%97%ac-%ec%82%ac%ec%9a%a9%ed%95%98%ea%b8%b0","status":"publish","type":"post","link":"http:\/\/pchero21.com\/?p=788","title":{"rendered":"\ud568\uc218 \uc774\ub984\uc744 \ud3ec\uc778\ud130\uc5d0 \ud560\ub2f9\ud558\uc5ec \uc0ac\uc6a9\ud558\uae30"},"content":{"rendered":"<p><\/p>\n<blockquote><p>\/\/ &nbsp; &nbsp;&nbsp; funcPtr.c<br \/>\/\/ &nbsp; &nbsp;&nbsp; <br \/>\/\/ &nbsp; &nbsp;&nbsp; Copyright 2009 Kim Sung-tae &lt;pchero@MyNote&gt;<br \/>\/\/ &nbsp; &nbsp;&nbsp; <br \/>\/\/ &nbsp; &nbsp;&nbsp; This program is free software; you can redistribute it and\/or modify<br \/>\/\/ &nbsp; &nbsp;&nbsp; it under the terms of the GNU General Public License as published by<br \/>\/\/ &nbsp; &nbsp;&nbsp; the Free Software Foundation; either version 2 of the License, or<br \/>\/\/ &nbsp; &nbsp;&nbsp; (at your option) any later version.<br \/>\/\/ &nbsp; &nbsp;&nbsp; <br \/>\/\/ &nbsp; &nbsp;&nbsp; This program is distributed in the hope that it will be useful,<br \/>\/\/ &nbsp; &nbsp;&nbsp; but WITHOUT ANY WARRANTY; without even the implied warranty of<br \/>\/\/ &nbsp; &nbsp;&nbsp; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&nbsp; See the<br \/>\/\/ &nbsp; &nbsp;&nbsp; GNU General Public License for more details.<br \/>\/\/ &nbsp; &nbsp;&nbsp; <br \/>\/\/ &nbsp; &nbsp;&nbsp; You should have received a copy of the GNU General Public License<br \/>\/\/ &nbsp; &nbsp;&nbsp; along with this program; if not, write to the Free Software<br \/>\/\/ &nbsp; &nbsp;&nbsp; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,<br \/>\/\/ &nbsp; &nbsp;&nbsp; MA 02110-1301, USA.<\/p>\n<p>#include &lt;stdio.h&gt;<\/p>\n<p>#define FUNC1 func1<br \/>#define FUNC2 func2<\/p>\n<p>int func1(int intVal1) { return &#8211;intVal1; }<br \/>int func2(int intVal2) { return &#8211;intVal2; }<\/p>\n<p>int runFunc(char* string, int inVal)<br \/>{<br \/>&nbsp; &nbsp; int retVal;<br \/>&nbsp; &nbsp; int (*funcPtr)(int retVal);<br \/>&nbsp; &nbsp; funcPtr = string;<br \/>&nbsp; &nbsp; return (*funcPtr)(inVal);<br \/>}<\/p>\n<p>int main(int argc, char** argv)<br \/>{<br \/>&nbsp; &nbsp; int intVal = 3;<br \/>&nbsp; &nbsp; intVal = runFunc(FUNC2, intVal);<br \/>&nbsp; &nbsp; printf(&#8220;After running func2 intVal : %dn&#8221;, intVal);<br \/>&nbsp; &nbsp; intVal = runFunc(FUNC1, intVal);<br \/>&nbsp; &nbsp; printf(&#8220;After running func1 intVal : %dn&#8221;, intVal);<br \/>&nbsp; &nbsp; <br \/>&nbsp; &nbsp; return 0;<br \/>}<\/p><\/blockquote>\n<p>&nbsp;\ud568\uc218 \uc774\ub984\uc744 \ud3ec\uc778\ud130\uc5d0 \ud560\ub2f9\ud558\uc5ec \uc0ac\uc6a9\ud558\ub294 \uc7ac\ubbf8\uc788\ub294 \ud504\ub85c\uadf8\ub7a8.<br \/>&nbsp;\ud568\uc218\ub4e4\uc744 \ud544\uc694\ud55c \uc21c\uc11c\ub300\ub85c \ub9cc\ub4e4\uc5b4 \ub454 \ub4a4, \ud3ec\uc778\ud130\ub97c \uc774\uc6a9\ud558\uc5ec \uc0c1\ud669\uc5d0 \ub530\ub77c \uc801\uc808\ud55c \ud568\uc218\uac00 \ud638\ucd9c\ub418\ub3c4\ub85d \ub9cc\ub4e0\ub2e4\uba74 \uc0c1\ud0dc\uba38\uc2e0(State machine)\ud504\ub85c\uadf8\ub7a8 \ub4f1 \uc720\uc6a9\ud558\uac8c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc744 \uac83\uc774\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/\/ &nbsp; &nbsp;&nbsp; funcPtr.c\/\/ &nbsp; &nbsp;&nbsp; \/\/ &nbsp; &nbsp;&nbsp; Copyright 2009 Kim Sung-tae &lt;pchero@MyNote&gt;\/\/ &nbsp; &nbsp;&nbsp; \/\/ &nbsp; &nbsp;&nbsp; This program is free software; you can redistribute it and\/or modify\/\/ &nbsp; &nbsp;&nbsp; it under the terms of the GNU General &hellip; <a href=\"http:\/\/pchero21.com\/?p=788\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[129,400],"_links":{"self":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/788"}],"collection":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=788"}],"version-history":[{"count":0,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/788\/revisions"}],"wp:attachment":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=788"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}