<?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[Struktur an Funktion übergeben]]></title><description><![CDATA[<p>hey leute frohe weihnachten!</p>
<p>ich habe ein problem. ich habe eine struktur:</p>
<pre><code class="language-cpp">struct structure
{
   int x ;
   int y ;
};
</code></pre>
<p>Die ich an eine funktion übergeben will:</p>
<pre><code class="language-cpp">void foo ( struct structure* xyz )
{
   /* blabla */
}
</code></pre>
<p>Aber wie ruf ich die funktion auf?</p>
<pre><code class="language-cpp">int main()
{
    structure xy = { 12, 15 } ;
    foo ( xy ) ; // So ?
    foo ( &amp;xy ) ; // Oder so??!
}
</code></pre>
<p><a href="http://home.fhtw-berlin.de/~junghans/cref/SYNTAX/struct.html" rel="nofollow">Denn hier wird beschrieben dass es ohne den Adressoperator gemacht wird!</a></p>
<p>Ich bekomm aber einen Compilerfehler wenn ich es ohne den &amp;-Operator mache<br />
könnt ihr mir eine erklärung abgeben? ich wäre euch sooooooooooooooooooooooooo dankbar !</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/257227/struktur-an-funktion-übergeben</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 16:58:31 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/257227.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 24 Dec 2009 23:22:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Struktur an Funktion übergeben on Thu, 24 Dec 2009 23:22:21 GMT]]></title><description><![CDATA[<p>hey leute frohe weihnachten!</p>
<p>ich habe ein problem. ich habe eine struktur:</p>
<pre><code class="language-cpp">struct structure
{
   int x ;
   int y ;
};
</code></pre>
<p>Die ich an eine funktion übergeben will:</p>
<pre><code class="language-cpp">void foo ( struct structure* xyz )
{
   /* blabla */
}
</code></pre>
<p>Aber wie ruf ich die funktion auf?</p>
<pre><code class="language-cpp">int main()
{
    structure xy = { 12, 15 } ;
    foo ( xy ) ; // So ?
    foo ( &amp;xy ) ; // Oder so??!
}
</code></pre>
<p><a href="http://home.fhtw-berlin.de/~junghans/cref/SYNTAX/struct.html" rel="nofollow">Denn hier wird beschrieben dass es ohne den Adressoperator gemacht wird!</a></p>
<p>Ich bekomm aber einen Compilerfehler wenn ich es ohne den &amp;-Operator mache<br />
könnt ihr mir eine erklärung abgeben? ich wäre euch sooooooooooooooooooooooooo dankbar !</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1827513</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1827513</guid><dc:creator><![CDATA[lala,po, tipsi]]></dc:creator><pubDate>Thu, 24 Dec 2009 23:22:21 GMT</pubDate></item><item><title><![CDATA[Reply to Struktur an Funktion übergeben on Thu, 24 Dec 2009 23:31:31 GMT]]></title><description><![CDATA[<p>In deinem Fall (Fkt. foo) ist der Parameter ein Zeiger auf eine Struktur, also musst du in diesem Fall auch einen Zeiger übergeben. Also ist der Adressoperator in deinem Fall richtig.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1827516</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1827516</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 24 Dec 2009 23:31:31 GMT</pubDate></item><item><title><![CDATA[Reply to Struktur an Funktion übergeben on Thu, 24 Dec 2009 23:32:36 GMT]]></title><description><![CDATA[<p>also wenn zeiger dann adresse</p>
<p>danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1827517</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1827517</guid><dc:creator><![CDATA[lala,po, tipsi]]></dc:creator><pubDate>Thu, 24 Dec 2009 23:32:36 GMT</pubDate></item><item><title><![CDATA[Reply to Struktur an Funktion übergeben on Thu, 24 Dec 2009 23:37:46 GMT]]></title><description><![CDATA[<p>lala,po, tipsi schrieb:</p>
<blockquote>
<p>also wenn zeiger dann adresse</p>
<p>danke!</p>
</blockquote>
<p>Zeiger zu Zeiger<br />
oder<br />
Adresse zu Zeiger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1827520</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1827520</guid><dc:creator><![CDATA[Kóyaánasqatsi]]></dc:creator><pubDate>Thu, 24 Dec 2009 23:37:46 GMT</pubDate></item></channel></rss>