<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Silveira Neto &#187; Cpp</title>
	<atom:link href="http://silveiraneto.net/tag/cpp/feed/" rel="self" type="application/rss+xml" />
	<link>http://silveiraneto.net</link>
	<description></description>
	<lastBuildDate>Fri, 09 Mar 2012 04:13:27 +0000</lastBuildDate>
	<language>pt-br</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Pointers to functions in C++</title>
		<link>http://silveiraneto.net/2008/03/16/pointers-to-functions-in-c/</link>
		<comments>http://silveiraneto.net/2008/03/16/pointers-to-functions-in-c/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 23:11:57 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Cpp]]></category>
		<category><![CDATA[pointers]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/2008/03/16/pointers-to-functions-in-c/</guid>
		<description><![CDATA[<a href="http://silveiraneto.net/2008/03/16/pointers-to-functions-in-c/" title="Pointers to functions in C++"></a>I need to implements some codes in C++. Just remembering some concepts like pointers to functions. A simple example: #include &#60;stdlib.h&#62; #include &#60;iostream&#62; using namespace std; double evalFunction(double (*f)(double), double param){ return f(param); } double function(double x){ return x/2; } &#8230;<p class="read-more"><a href="http://silveiraneto.net/2008/03/16/pointers-to-functions-in-c/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://silveiraneto.net/2008/03/16/pointers-to-functions-in-c/" title="Pointers to functions in C++"></a><p>I need to implements some codes in C++. Just remembering some concepts like pointers to functions.</p>
<p>A simple example:</p>
<pre name="code" class="cpp">
#include &lt;stdlib.h&gt;
#include &lt;iostream&gt;

using namespace std;

double evalFunction(double (*f)(double), double param){
    return f(param);
}

double function(double x){
    return x/2;
}

int main(int argc, char** argv) {
    cout &lt;&lt; function(5.0) &lt;&lt; endl;
    cout &lt;&lt; evalFunction(function, 5.0) &lt;&lt; endl;
    return (EXIT_SUCCESS);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2008/03/16/pointers-to-functions-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

