<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Frage zu Funktion]]></title><description><![CDATA[<p>Hallo was ist das hier für eine Funktion ?</p>
<p>( func () );</p>
<p>Was kann man damit machen sowas hab ich vorher noch nie gesehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/258155/frage-zu-funktion</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 13:38:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/258155.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 07 Jan 2010 10:04:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Frage zu Funktion on Thu, 07 Jan 2010 10:04:51 GMT]]></title><description><![CDATA[<p>Hallo was ist das hier für eine Funktion ?</p>
<p>( func () );</p>
<p>Was kann man damit machen sowas hab ich vorher noch nie gesehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1834178</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1834178</guid><dc:creator><![CDATA[var_]]></dc:creator><pubDate>Thu, 07 Jan 2010 10:04:51 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Funktion on Thu, 07 Jan 2010 10:05:59 GMT]]></title><description><![CDATA[<p>Das ist ein Funktionsaufruf. Keine Funktion. Und die Klammern drum herum haben gar nichts zu bedeuten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1834181</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1834181</guid><dc:creator><![CDATA[Fellhuhn]]></dc:creator><pubDate>Thu, 07 Jan 2010 10:05:59 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Funktion on Thu, 07 Jan 2010 10:51:26 GMT]]></title><description><![CDATA[<p>Also ist das sowas ?</p>
<p>func();</p>
<p>Hier bekommt func(); automatisch den Datentyp void oder ?</p>
<p>Ich meine ich hätte mal irgendwie sowas gelesen ...</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

func();

int main()
{

 func();

system(&quot;PAUSE&quot;);
}

func()
{
 cout&lt;&lt;&quot;ok&quot;;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1834217</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1834217</guid><dc:creator><![CDATA[var_]]></dc:creator><pubDate>Thu, 07 Jan 2010 10:51:26 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Funktion on Thu, 07 Jan 2010 10:53:30 GMT]]></title><description><![CDATA[<p>var_ schrieb:</p>
<blockquote>
<p>Hier bekommt func(); automatisch den Datentyp void oder ?</p>
</blockquote>
<p>Nein, func &quot;bekommt&quot; dadurch gar nichts. func wird hier nur verwendet. Du kannst daraus allenfalls <strong>ablesen</strong>, dass func keine Parameter (oder nur Parameter mit Defaultwerten) hat. Auf den Rückgabetyp kannst du daraus nicht schließen, es könnte auch sein, dass func einen hat, der aber hier ignoriert wird.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1834219</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1834219</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Thu, 07 Jan 2010 10:53:30 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Funktion on Thu, 07 Jan 2010 10:59:10 GMT]]></title><description><![CDATA[<p>Und das &quot;func()&quot; was da alleine oben bei deinem Beispiel steht ist eine Forward Declaration. Ansonsten wüsste deine main-Methode nicht das es diese Funktion gibt, da der Compiler noch nicht so weit in der Datei ist. Benutzt man Header, benötigt man dies (meist) nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1834223</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1834223</guid><dc:creator><![CDATA[Fellhuhn]]></dc:creator><pubDate>Thu, 07 Jan 2010 10:59:10 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Funktion on Thu, 07 Jan 2010 11:01:54 GMT]]></title><description><![CDATA[<p>var_ schrieb:</p>
<blockquote>
<p>Hier bekommt func(); automatisch den Datentyp void oder ?</p>
</blockquote>
<p>Das was du hier zeigst, geht mit einem ordentlichen C++ Compiler nicht. Eine Typangabe ist verpflichtend (Und wenn ein Compiler es fälschlicherweise zulässt, wird int und nicht void als Typ angenommen). Das beantwortet aber deine Frage dennoch nicht.</p>
<p>Die Angabe &quot;( func() )&quot; lässt keinen Rückschluss auf den Rückgabetyp zu, und Theoretisch muss es auch noch nicht einmal ein Funktionsaufruf sein (&quot;int()&quot; ist z.B. auch gültiges C++) - auch wenn es naheliegend ist.</p>
<p>Nehmen wir an das es ein Funktionsaufruf ist. Einen Rückgabewert kann man ignorieren, daher ist nur bekannt das eine Funktion &quot;func&quot; aufgerufen wird, die entweder keine Parameter, oder nur Parameter mit Standardwerten akzeptiert. Die Äußeren Klammern kann man wie in der Mathematik in der Regel ignorieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1834225</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1834225</guid><dc:creator><![CDATA[asc]]></dc:creator><pubDate>Thu, 07 Jan 2010 11:01:54 GMT</pubDate></item></channel></rss>