<?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[Zugriff auf Variablen&#x2F;Zeiger]]></title><description><![CDATA[<p>Hi, ich habe folgendes Problem ich brauch Zugriff auf die Variablen/Zeiger die ich dem Konstruktor übergeben habe, auch unten in der Funktion.<br />
Wie ich sie dort einsetzen will hab ich gleich mal im Quelltext dargestellt.</p>
<p>Hier mal der Quelltext:</p>
<pre><code class="language-cpp">#include &lt;QApplication&gt;
#include &quot;myinput.h&quot;

MyInput::MyInput(QString *host, QString *datenbank, QString *username, QString *passwort, QString *tabelle)
{
	layout	= new QVBoxLayout;
	conbut	= new QPushButton(&quot;connect&quot;);

	infol	= new QLabel(&quot;Please enter your datas:&quot;);

	userl	= new QLabel(&quot;Username&quot;);
	pwl	= new QLabel(&quot;Userpasswort&quot;);
	hostl	= new QLabel(&quot;Hostaddress&quot;);
	dbl	= new QLabel(&quot;Database&quot;);
	tablel	= new QLabel(&quot;Table&quot;);

	usere	= new QLineEdit;
	pwe	= new QLineEdit;
	hoste	= new QLineEdit;
	dbe	= new QLineEdit;
	tablee	= new QLineEdit;

	layout-&gt;addWidget(infol);
	layout-&gt;addWidget(userl);
	layout-&gt;addWidget(usere);
	layout-&gt;addWidget(pwl);
	layout-&gt;addWidget(pwe);
	layout-&gt;addWidget(hostl);
	layout-&gt;addWidget(hoste);
	layout-&gt;addWidget(dbl);
	layout-&gt;addWidget(dbe);
	layout-&gt;addWidget(tablel);
	layout-&gt;addWidget(tablee);
	layout-&gt;addWidget(conbut);
	setLayout(layout);

	connect( conbut, SIGNAL(clicked()),	this, SLOT(setvar()) );
	connect( conbut, SIGNAL(clicked()),	this, SLOT(quit()) );
}
void MyInput::MyInput::setvar()
{
	*host		=hoste-&gt;text();
	*datenbank	=dbe-&gt;text();
	*username	=tablee-&gt;text();
	*passwort	=usere-&gt;text();
	*tabelle	=pwe-&gt;text();
}
</code></pre>
<p>Weiss einfach nicht wie ich das adäquart bewerkstelligen kann.</p>
<p>Gruss Irods.</p>
<p>ps: schon ma thx</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/243685/zugriff-auf-variablen-zeiger</link><generator>RSS for Node</generator><lastBuildDate>Sat, 19 Sep 2026 21:11:44 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/243685.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 19 Jun 2009 19:16:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zugriff auf Variablen&#x2F;Zeiger on Fri, 19 Jun 2009 20:10:43 GMT]]></title><description><![CDATA[<p>Hi, ich habe folgendes Problem ich brauch Zugriff auf die Variablen/Zeiger die ich dem Konstruktor übergeben habe, auch unten in der Funktion.<br />
Wie ich sie dort einsetzen will hab ich gleich mal im Quelltext dargestellt.</p>
<p>Hier mal der Quelltext:</p>
<pre><code class="language-cpp">#include &lt;QApplication&gt;
#include &quot;myinput.h&quot;

MyInput::MyInput(QString *host, QString *datenbank, QString *username, QString *passwort, QString *tabelle)
{
	layout	= new QVBoxLayout;
	conbut	= new QPushButton(&quot;connect&quot;);

	infol	= new QLabel(&quot;Please enter your datas:&quot;);

	userl	= new QLabel(&quot;Username&quot;);
	pwl	= new QLabel(&quot;Userpasswort&quot;);
	hostl	= new QLabel(&quot;Hostaddress&quot;);
	dbl	= new QLabel(&quot;Database&quot;);
	tablel	= new QLabel(&quot;Table&quot;);

	usere	= new QLineEdit;
	pwe	= new QLineEdit;
	hoste	= new QLineEdit;
	dbe	= new QLineEdit;
	tablee	= new QLineEdit;

	layout-&gt;addWidget(infol);
	layout-&gt;addWidget(userl);
	layout-&gt;addWidget(usere);
	layout-&gt;addWidget(pwl);
	layout-&gt;addWidget(pwe);
	layout-&gt;addWidget(hostl);
	layout-&gt;addWidget(hoste);
	layout-&gt;addWidget(dbl);
	layout-&gt;addWidget(dbe);
	layout-&gt;addWidget(tablel);
	layout-&gt;addWidget(tablee);
	layout-&gt;addWidget(conbut);
	setLayout(layout);

	connect( conbut, SIGNAL(clicked()),	this, SLOT(setvar()) );
	connect( conbut, SIGNAL(clicked()),	this, SLOT(quit()) );
}
void MyInput::MyInput::setvar()
{
	*host		=hoste-&gt;text();
	*datenbank	=dbe-&gt;text();
	*username	=tablee-&gt;text();
	*passwort	=usere-&gt;text();
	*tabelle	=pwe-&gt;text();
}
</code></pre>
<p>Weiss einfach nicht wie ich das adäquart bewerkstelligen kann.</p>
<p>Gruss Irods.</p>
<p>ps: schon ma thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1729744</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1729744</guid><dc:creator><![CDATA[Irods]]></dc:creator><pubDate>Fri, 19 Jun 2009 20:10:43 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf Variablen&#x2F;Zeiger on Fri, 19 Jun 2009 19:50:31 GMT]]></title><description><![CDATA[<p>adequart. lol. Wenn du es schon nicht schreiben kannst, schreib doch einfach &quot;angemessen&quot;. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<p>Zur Frage: Kein Mensch versteht was du willst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1729759</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1729759</guid><dc:creator><![CDATA[KennerDerFremdWortNoobs]]></dc:creator><pubDate>Fri, 19 Jun 2009 19:50:31 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf Variablen&#x2F;Zeiger on Fri, 19 Jun 2009 19:59:33 GMT]]></title><description><![CDATA[<p>KennerDerFremdWortNoobs schrieb:</p>
<blockquote>
<p>adequart. lol. Wenn du es schon nicht schreiben kannst, schreib doch einfach &quot;angemessen&quot;. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<p>Zur Frage: Kein Mensch versteht was du willst.</p>
</blockquote>
<p>deine mama xD</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1729776</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1729776</guid><dc:creator><![CDATA[Irods]]></dc:creator><pubDate>Fri, 19 Jun 2009 19:59:33 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf Variablen&#x2F;Zeiger on Fri, 19 Jun 2009 21:10:54 GMT]]></title><description><![CDATA[<p>Wenn du Zugriff auf die dem Konstruktor übergebenen Pointer auch in anderen Methoden der Klasse haben willst, musst du sie einfach als Member der Klasse speichern (z.B. auch gesammelt in einer Struktur, wenn das Sinn macht).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1729810</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1729810</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Fri, 19 Jun 2009 21:10:54 GMT</pubDate></item></channel></rss>