<?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[&#x27;=&#x27;: &#x27;char []&#x27; kann nicht in &#x27;char [30]&#x27; konvertiert werden]]></title><description><![CDATA[<p>Hallo,</p>
<p>komme von PHP und da ist das nicht so wichtig mit den ganzen Datentypen. Nun habe ich studiumsmäßig mit C++ zu tun und komme gerade nicht weiter. Diese Fehlermeldungen (^^Topic) bringt er mir. Die Idee ist eine Adressebuch mit vielen Personen irgendwann... Der Code sieht bisher so aus:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;conio.h&gt;
#include &lt;windows.h&gt;
using namespace std;

void wait(void);

class Adressbuch{
public:
	Adressbuch(int maxEintraege);
private:
	unsigned int itsEintraege;
	unsigned int itsMaxEintraege;

};

Adressbuch::Adressbuch(int maxEintraege){
	itsMaxEintraege=maxEintraege;
	itsEintraege=0;
}

class Person{
public:
	Person(char name[30], char vorname[30]);
	void GetName();
private:
	char itsName[30];
	char itsVorname[30];
};

Person::Person(char name[30], char vorname[30]){
	itsName=name;
	itsVorname=vorname;
}

void Person::GetName(){
	cout &lt;&lt; itsVorname;
}

int main(void){
	Adressbuch adressen(100);
	Person thomas(&quot;lippert&quot;,&quot;thomas&quot;);
	thomas.GetName();

	wait();
	return 0;
}

//Funktion zum Warten auf einen beliebigen Tastendruck
void wait (){
    FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE));
    getch();
}
</code></pre>
<p>Da ich halt noch nicht viel mit C++ gearbeitet habe, finde ich den Fehler einfach nicht. Kann mir da jemand helfen? Was mache ich falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/160594/char-kann-nicht-in-char-30-konvertiert-werden</link><generator>RSS for Node</generator><lastBuildDate>Fri, 11 Sep 2026 09:34:15 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/160594.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 27 Sep 2006 11:33:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to &#x27;=&#x27;: &#x27;char []&#x27; kann nicht in &#x27;char [30]&#x27; konvertiert werden on Wed, 27 Sep 2006 11:33:17 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>komme von PHP und da ist das nicht so wichtig mit den ganzen Datentypen. Nun habe ich studiumsmäßig mit C++ zu tun und komme gerade nicht weiter. Diese Fehlermeldungen (^^Topic) bringt er mir. Die Idee ist eine Adressebuch mit vielen Personen irgendwann... Der Code sieht bisher so aus:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;conio.h&gt;
#include &lt;windows.h&gt;
using namespace std;

void wait(void);

class Adressbuch{
public:
	Adressbuch(int maxEintraege);
private:
	unsigned int itsEintraege;
	unsigned int itsMaxEintraege;

};

Adressbuch::Adressbuch(int maxEintraege){
	itsMaxEintraege=maxEintraege;
	itsEintraege=0;
}

class Person{
public:
	Person(char name[30], char vorname[30]);
	void GetName();
private:
	char itsName[30];
	char itsVorname[30];
};

Person::Person(char name[30], char vorname[30]){
	itsName=name;
	itsVorname=vorname;
}

void Person::GetName(){
	cout &lt;&lt; itsVorname;
}

int main(void){
	Adressbuch adressen(100);
	Person thomas(&quot;lippert&quot;,&quot;thomas&quot;);
	thomas.GetName();

	wait();
	return 0;
}

//Funktion zum Warten auf einen beliebigen Tastendruck
void wait (){
    FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE));
    getch();
}
</code></pre>
<p>Da ich halt noch nicht viel mit C++ gearbeitet habe, finde ich den Fehler einfach nicht. Kann mir da jemand helfen? Was mache ich falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145338</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145338</guid><dc:creator><![CDATA[lomtas]]></dc:creator><pubDate>Wed, 27 Sep 2006 11:33:17 GMT</pubDate></item><item><title><![CDATA[Reply to &#x27;=&#x27;: &#x27;char []&#x27; kann nicht in &#x27;char [30]&#x27; konvertiert werden on Wed, 27 Sep 2006 12:45:44 GMT]]></title><description><![CDATA[<p>arrays können in C++ nicht auf diese weise verwendet werden (sie sind nicht kopierbar). benutze besser std::strings.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145392</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145392</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Wed, 27 Sep 2006 12:45:44 GMT</pubDate></item><item><title><![CDATA[Reply to &#x27;=&#x27;: &#x27;char []&#x27; kann nicht in &#x27;char [30]&#x27; konvertiert werden on Wed, 27 Sep 2006 13:38:25 GMT]]></title><description><![CDATA[<p>such mal nach memset()... die syntax genau kenne ich nicht... aber strings sind sowiso das beste;)<br />
TGM</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145423</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145423</guid><dc:creator><![CDATA[TGM]]></dc:creator><pubDate>Wed, 27 Sep 2006 13:38:25 GMT</pubDate></item><item><title><![CDATA[Reply to &#x27;=&#x27;: &#x27;char []&#x27; kann nicht in &#x27;char [30]&#x27; konvertiert werden on Wed, 27 Sep 2006 15:41:47 GMT]]></title><description><![CDATA[<p>also gibt es auch richtige Strings?<br />
Habt ihr dazu ne Infoseite?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145527</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145527</guid><dc:creator><![CDATA[lomtas]]></dc:creator><pubDate>Wed, 27 Sep 2006 15:41:47 GMT</pubDate></item><item><title><![CDATA[Reply to &#x27;=&#x27;: &#x27;char []&#x27; kann nicht in &#x27;char [30]&#x27; konvertiert werden on Thu, 28 Sep 2006 13:57:39 GMT]]></title><description><![CDATA[<p>In C++ bietet die Standard Library Strings an. Referenz hier: <a href="http://www.cppreference.com/cppstring/index.html" rel="nofollow">http://www.cppreference.com/cppstring/index.html</a></p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;string&gt;
using namespace std;

...

string mystr = &quot;Hugo&quot;;
cout &lt;&lt; mystr;
</code></pre>
<p>MfG SideWinder</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145983</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145983</guid><dc:creator><![CDATA[SideWinder]]></dc:creator><pubDate>Thu, 28 Sep 2006 13:57:39 GMT</pubDate></item><item><title><![CDATA[Reply to &#x27;=&#x27;: &#x27;char []&#x27; kann nicht in &#x27;char [30]&#x27; konvertiert werden on Thu, 28 Sep 2006 13:57:48 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=2822" rel="nofollow">SideWinder</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=13" rel="nofollow">DOS und Win32-Konsole</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145984</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145984</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Thu, 28 Sep 2006 13:57:48 GMT</pubDate></item><item><title><![CDATA[Reply to &#x27;=&#x27;: &#x27;char []&#x27; kann nicht in &#x27;char [30]&#x27; konvertiert werden on Thu, 28 Sep 2006 18:39:03 GMT]]></title><description><![CDATA[<p>Danke, damit funktioniert es einwandfrei!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1146121</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1146121</guid><dc:creator><![CDATA[lomtas]]></dc:creator><pubDate>Thu, 28 Sep 2006 18:39:03 GMT</pubDate></item></channel></rss>