<?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[Problem mit Zeigerübergabe]]></title><description><![CDATA[<p>Hallo!<br />
Ich habe folgendes Problem:</p>
<pre><code class="language-cpp">p1 = buffer;
		p2 = strchr(p1, '|');
		*p2++ = '\0';

		kl.push_back(*p1);
		vkl.push_back(*p2);
</code></pre>
<p>Mein bisheriger Code trennt die Variable <strong>buffer</strong> bei dem Zeichen '|' in 2 Teile auf(<strong>p1</strong>, <strong>p2</strong>). Dann soll Teil 1 in <strong>kl</strong> bzw. Teil 2 in <strong>vkl</strong> geschrieben werden. Allerdings wird immer nur das erste Zeichen von <strong>p1</strong> bzw. <strong>p2</strong> in die Vektoren geschrieben. Wenn ich es mit</p>
<pre><code class="language-cpp">vkl.push_back(p2);
</code></pre>
<p>versuche bekomme ich nur die Fehlermeldung, dass ein umwandeln von 'char *' in 'const char' nicht möglich ist.</p>
<p>Ich hoffe ihr könnt mir helfen!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/160858/problem-mit-zeigerübergabe</link><generator>RSS for Node</generator><lastBuildDate>Fri, 11 Sep 2026 10:43:10 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/160858.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 30 Sep 2006 10:10:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit Zeigerübergabe on Sat, 30 Sep 2006 10:10:15 GMT]]></title><description><![CDATA[<p>Hallo!<br />
Ich habe folgendes Problem:</p>
<pre><code class="language-cpp">p1 = buffer;
		p2 = strchr(p1, '|');
		*p2++ = '\0';

		kl.push_back(*p1);
		vkl.push_back(*p2);
</code></pre>
<p>Mein bisheriger Code trennt die Variable <strong>buffer</strong> bei dem Zeichen '|' in 2 Teile auf(<strong>p1</strong>, <strong>p2</strong>). Dann soll Teil 1 in <strong>kl</strong> bzw. Teil 2 in <strong>vkl</strong> geschrieben werden. Allerdings wird immer nur das erste Zeichen von <strong>p1</strong> bzw. <strong>p2</strong> in die Vektoren geschrieben. Wenn ich es mit</p>
<pre><code class="language-cpp">vkl.push_back(p2);
</code></pre>
<p>versuche bekomme ich nur die Fehlermeldung, dass ein umwandeln von 'char *' in 'const char' nicht möglich ist.</p>
<p>Ich hoffe ihr könnt mir helfen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1146912</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1146912</guid><dc:creator><![CDATA[Patrick_B]]></dc:creator><pubDate>Sat, 30 Sep 2006 10:10:15 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Zeigerübergabe on Sat, 30 Sep 2006 10:12:39 GMT]]></title><description><![CDATA[<p>Ist kl vom Typ T&lt;char&gt; ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1146914</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1146914</guid><dc:creator><![CDATA[Knuddlbaer]]></dc:creator><pubDate>Sat, 30 Sep 2006 10:12:39 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Zeigerübergabe on Sat, 30 Sep 2006 10:33:01 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">vector&lt;char&gt; kleider;
</code></pre>
<p>Ich habe keine Ahnung ob das T&lt;char&gt; ist!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1146925</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1146925</guid><dc:creator><![CDATA[Patrick_B]]></dc:creator><pubDate>Sat, 30 Sep 2006 10:33:01 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Zeigerübergabe on Sat, 30 Sep 2006 10:55:36 GMT]]></title><description><![CDATA[<p>Jup ist es. Ich wusste nicht ob Du einen vector einsetzt.</p>
<p>Das verhalten Deines Programs ist richtig. Du sagst mit vector&lt;char&gt; das Du einzelne chars speichern willst. Also wird push_back auch nur solche liefern.</p>
<p>Eventuell war hier eher vector&lt;string&gt; gemeint ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1146936</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1146936</guid><dc:creator><![CDATA[Knuddlbaer]]></dc:creator><pubDate>Sat, 30 Sep 2006 10:55:36 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Zeigerübergabe on Sat, 30 Sep 2006 11:05:03 GMT]]></title><description><![CDATA[<p>vielen Dank, jezt ist mir klar weshalb das nicht funktioniert!<br />
Ich werde es mal mit einem string-vektor versuchen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1146943</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1146943</guid><dc:creator><![CDATA[Patrick_B]]></dc:creator><pubDate>Sat, 30 Sep 2006 11:05:03 GMT</pubDate></item></channel></rss>