<?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[zeiger auf eine struktur als parameter]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie übergebe ich denn einer Funktion, die einen Zeiger verlangt, ein Element einer Struktur?</p>
<pre><code class="language-cpp">struct test {

 int variable1;
 int variable2;

};

test test_struct;

test_struct.variable1 = 2;
test_struct.variable2 = 20;

void TextFunktion(int *value) {

//hier geschieht irgendwas

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/264032/zeiger-auf-eine-struktur-als-parameter</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Sep 2026 11:20:45 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/264032.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 31 Mar 2010 16:17:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to zeiger auf eine struktur als parameter on Wed, 31 Mar 2010 16:17:07 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie übergebe ich denn einer Funktion, die einen Zeiger verlangt, ein Element einer Struktur?</p>
<pre><code class="language-cpp">struct test {

 int variable1;
 int variable2;

};

test test_struct;

test_struct.variable1 = 2;
test_struct.variable2 = 20;

void TextFunktion(int *value) {

//hier geschieht irgendwas

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1876054</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1876054</guid><dc:creator><![CDATA[anno]]></dc:creator><pubDate>Wed, 31 Mar 2010 16:17:07 GMT</pubDate></item><item><title><![CDATA[Reply to zeiger auf eine struktur als parameter on Wed, 31 Mar 2010 16:24:59 GMT]]></title><description><![CDATA[<p>Dazu benutzt du den Adress-Operator &amp;, also ganz einfach &quot;&amp;test_struct.variable1&quot; (. hat eine höhere Priorität als &amp;, geht also Problemlos).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1876060</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1876060</guid><dc:creator><![CDATA[Janjan]]></dc:creator><pubDate>Wed, 31 Mar 2010 16:24:59 GMT</pubDate></item><item><title><![CDATA[Reply to zeiger auf eine struktur als parameter on Wed, 31 Mar 2010 16:34:50 GMT]]></title><description><![CDATA[<p>ja, das ahbe ich schon probiert.</p>
<p>da bekomme ich aber folgende Meldung zurück:</p>
<pre><code>undefined reference to `TextFunktion(int *value)'
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1876068</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1876068</guid><dc:creator><![CDATA[anno]]></dc:creator><pubDate>Wed, 31 Mar 2010 16:34:50 GMT</pubDate></item><item><title><![CDATA[Reply to zeiger auf eine struktur als parameter on Wed, 31 Mar 2010 16:38:43 GMT]]></title><description><![CDATA[<p>anno schrieb:</p>
<blockquote>
<p>ja, das ahbe ich schon probiert.</p>
<p>da bekomme ich aber folgende Meldung zurück:</p>
<pre><code>undefined reference to `TextFunktion(int *value)'
</code></pre>
</blockquote>
<p>Und die Dinge haben nichts miteinander zutun. Implementierst du diese Funktion denn auch? Am besten mal gesamten Code posten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1876070</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1876070</guid><dc:creator><![CDATA[Janjan]]></dc:creator><pubDate>Wed, 31 Mar 2010 16:38:43 GMT</pubDate></item><item><title><![CDATA[Reply to zeiger auf eine struktur als parameter on Wed, 31 Mar 2010 16:46:08 GMT]]></title><description><![CDATA[<p>ja das stimmt, war das problem. jetzt funktioniert es. danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1876074</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1876074</guid><dc:creator><![CDATA[anno]]></dc:creator><pubDate>Wed, 31 Mar 2010 16:46:08 GMT</pubDate></item><item><title><![CDATA[Reply to zeiger auf eine struktur als parameter on Wed, 31 Mar 2010 16:50:06 GMT]]></title><description><![CDATA[<p>Hast du dir schonmal Referenzen angeschaut? Die sind den Zeigern zu bevorzugen, wo immer es möglich ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1876077</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1876077</guid><dc:creator><![CDATA[Janjan]]></dc:creator><pubDate>Wed, 31 Mar 2010 16:50:06 GMT</pubDate></item><item><title><![CDATA[Reply to zeiger auf eine struktur als parameter on Wed, 31 Mar 2010 20:48:50 GMT]]></title><description><![CDATA[<p>Janjan schrieb:</p>
<blockquote>
<p>Hast du dir schonmal Referenzen angeschaut? Die sind den Zeigern zu bevorzugen, wo immer es <strong>möglich</strong> ist.</p>
</blockquote>
<p>&quot;Sinnvoll&quot; triffts besser.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1876187</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1876187</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Wed, 31 Mar 2010 20:48:50 GMT</pubDate></item></channel></rss>