<?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[Inhalt von Vector in Listenfeld]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>schon wieder ich, brauche aber Hilfe...</p>
<p>Habe einen vector&lt;CServer*&gt; m_vServerliste als public, in einer Class die heisst CServerliste.<br />
Dann gibt es eine Class mit CServer.<br />
Dort stehen m_strServername usw.</p>
<p>Jetzt habe ich den Vector gefüllt. Wenn ich den Vector in eine Datei schreibe, kommt der Inhalt korrect.</p>
<p>Jetzt will ich aber z.b m_strServername im Listenfeld eines Dialoges habe<br />
(CServerDialog) mit einer Schleife soviele Server es gibt und anzeigen lassen.<br />
Es kommt aber nichts...</p>
<p>Hier der Code:<br />
BOOL CServerDialog::OnInitDialog()<br />
{<br />
CDialog::OnInitDialog();<br />
CServerliste m_cServerliste;</p>
<p>// TODO: Zusätzliche Initialisierung hier einfügen</p>
<p>CListBox* pLB = (CListBox*) GetDlgItem(IDC_LISTSERVER);<br />
for(int i= 0; i != m_cServerliste.getAnzahlServer(); i++)<br />
{<br />
// Hier sollte der Servername angezeigt werden....<br />
pLB-&gt;InsertString(-1, &quot;Dokumentation&quot;);</p>
<p>}</p>
<p>// Aufruf nach Initialisierung<br />
return CDialog::OnInitDialog();</p>
<p>return TRUE; // return TRUE unless you set the focus to a control<br />
// EXCEPTION: OCX-Eigenschaftenseiten sollten FALSE zurückgeben<br />
}</p>
<p>KAnn mir jemand Helfen ??</p>
<p>Gruß<br />
andy_mann</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/68437/inhalt-von-vector-in-listenfeld</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 19:54:54 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/68437.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 17 Mar 2004 19:49:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Inhalt von Vector in Listenfeld on Wed, 17 Mar 2004 19:49:57 GMT]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>schon wieder ich, brauche aber Hilfe...</p>
<p>Habe einen vector&lt;CServer*&gt; m_vServerliste als public, in einer Class die heisst CServerliste.<br />
Dann gibt es eine Class mit CServer.<br />
Dort stehen m_strServername usw.</p>
<p>Jetzt habe ich den Vector gefüllt. Wenn ich den Vector in eine Datei schreibe, kommt der Inhalt korrect.</p>
<p>Jetzt will ich aber z.b m_strServername im Listenfeld eines Dialoges habe<br />
(CServerDialog) mit einer Schleife soviele Server es gibt und anzeigen lassen.<br />
Es kommt aber nichts...</p>
<p>Hier der Code:<br />
BOOL CServerDialog::OnInitDialog()<br />
{<br />
CDialog::OnInitDialog();<br />
CServerliste m_cServerliste;</p>
<p>// TODO: Zusätzliche Initialisierung hier einfügen</p>
<p>CListBox* pLB = (CListBox*) GetDlgItem(IDC_LISTSERVER);<br />
for(int i= 0; i != m_cServerliste.getAnzahlServer(); i++)<br />
{<br />
// Hier sollte der Servername angezeigt werden....<br />
pLB-&gt;InsertString(-1, &quot;Dokumentation&quot;);</p>
<p>}</p>
<p>// Aufruf nach Initialisierung<br />
return CDialog::OnInitDialog();</p>
<p>return TRUE; // return TRUE unless you set the focus to a control<br />
// EXCEPTION: OCX-Eigenschaftenseiten sollten FALSE zurückgeben<br />
}</p>
<p>KAnn mir jemand Helfen ??</p>
<p>Gruß<br />
andy_mann</p>
]]></description><link>https://www.c-plusplus.net/forum/post/482964</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/482964</guid><dc:creator><![CDATA[andy_mann]]></dc:creator><pubDate>Wed, 17 Mar 2004 19:49:57 GMT</pubDate></item><item><title><![CDATA[Reply to Inhalt von Vector in Listenfeld on Wed, 17 Mar 2004 20:54:20 GMT]]></title><description><![CDATA[<p>Mal abgesehen davon das CServerListe unbekannt ist...</p>
<p>Wo ist das Problem ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/483029</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/483029</guid><dc:creator><![CDATA[Knuddlbaer]]></dc:creator><pubDate>Wed, 17 Mar 2004 20:54:20 GMT</pubDate></item><item><title><![CDATA[Reply to Inhalt von Vector in Listenfeld on Wed, 17 Mar 2004 22:54:11 GMT]]></title><description><![CDATA[<p>Wieso ist die Unbekannt ??</p>
<p>habe in der ServerDialog.h die Serverliste includiert....</p>
<p>Gruß<br />
andy_mann</p>
]]></description><link>https://www.c-plusplus.net/forum/post/483134</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/483134</guid><dc:creator><![CDATA[andy_mann]]></dc:creator><pubDate>Wed, 17 Mar 2004 22:54:11 GMT</pubDate></item><item><title><![CDATA[Reply to Inhalt von Vector in Listenfeld on Thu, 18 Mar 2004 07:46:21 GMT]]></title><description><![CDATA[<p>Kann mir keiner Helfen,</p>
<p>wie greiffe ich auf den Vector zu der in einer anderen class inplementiert ist und gefüllt wurde...</p>
<p>Gruß<br />
andy_mann</p>
]]></description><link>https://www.c-plusplus.net/forum/post/483217</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/483217</guid><dc:creator><![CDATA[andy_mann]]></dc:creator><pubDate>Thu, 18 Mar 2004 07:46:21 GMT</pubDate></item><item><title><![CDATA[Reply to Inhalt von Vector in Listenfeld on Thu, 18 Mar 2004 07:49:45 GMT]]></title><description><![CDATA[<p>Gib der CServerliste einfach eine Funktion<br />
vector&lt;CServer*&gt; * GetList();<br />
Oder überlade für die Klasse CServerliste den operator[].</p>
<p>Devil</p>
]]></description><link>https://www.c-plusplus.net/forum/post/483222</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/483222</guid><dc:creator><![CDATA[phlox81]]></dc:creator><pubDate>Thu, 18 Mar 2004 07:49:45 GMT</pubDate></item><item><title><![CDATA[Reply to Inhalt von Vector in Listenfeld on Thu, 18 Mar 2004 08:11:01 GMT]]></title><description><![CDATA[<p>Genau dass probiere ich jetzt schon seit einem Tag....<br />
nicht funktioniert aber..</p>
<p>hier meine Funktion..</p>
<p>std::vector&lt;CServer*&gt; CServerliste::getServerliste()<br />
{<br />
return vServerliste;<br />
}</p>
<p>dann probier ich mit<br />
CServerliste m_Serverliste;<br />
int anzahl = m_Serverliste.getServerliste().sice();<br />
in der CServerDialog diese Funktion auf zu rufen um z.b. die anzahl heraus zu finden.</p>
<p>Geht aber nicht...</p>
<p>Gruß<br />
andy_mann</p>
]]></description><link>https://www.c-plusplus.net/forum/post/483228</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/483228</guid><dc:creator><![CDATA[andy_mann]]></dc:creator><pubDate>Thu, 18 Mar 2004 08:11:01 GMT</pubDate></item><item><title><![CDATA[Reply to Inhalt von Vector in Listenfeld on Thu, 18 Mar 2004 08:27:25 GMT]]></title><description><![CDATA[<p>Hm, kann es sein das CServer keinen Copy Konstruktor hat ?</p>
<p>Devil</p>
]]></description><link>https://www.c-plusplus.net/forum/post/483240</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/483240</guid><dc:creator><![CDATA[phlox81]]></dc:creator><pubDate>Thu, 18 Mar 2004 08:27:25 GMT</pubDate></item><item><title><![CDATA[Reply to Inhalt von Vector in Listenfeld on Thu, 18 Mar 2004 08:34:27 GMT]]></title><description><![CDATA[<p>Doch....</p>
<p>CServer::CServer(std::string u_strID, std::string u_strName, CServerliste* u_pServerListe)<br />
{<br />
m_vServerListe = u_pServerListe;<br />
fDatenbankInVector(u_strID, u_strName);<br />
}</p>
<p>void CServer::fDatenbankInVector(std::string u_strID, std::string u_strName)<br />
{<br />
m_strID = u_strID;<br />
m_strServername = u_strName;</p>
<p>}</p>
<p>im Debug modus, sehe ich dass die Variablen gefüllt mit Inhalt da sind, aber irgendwie wird der vector dann nicht gefüllt..</p>
<p>Gruß<br />
andy_mann</p>
]]></description><link>https://www.c-plusplus.net/forum/post/483244</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/483244</guid><dc:creator><![CDATA[andy_mann]]></dc:creator><pubDate>Thu, 18 Mar 2004 08:34:27 GMT</pubDate></item><item><title><![CDATA[Reply to Inhalt von Vector in Listenfeld on Thu, 18 Mar 2004 08:38:23 GMT]]></title><description><![CDATA[<p>1. benutze bitte Code Tags.</p>
<p>2. Informiere dich was ein Copy Konstruktor ist, und wofür er da ist.</p>
<p>Devil</p>
]]></description><link>https://www.c-plusplus.net/forum/post/483250</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/483250</guid><dc:creator><![CDATA[phlox81]]></dc:creator><pubDate>Thu, 18 Mar 2004 08:38:23 GMT</pubDate></item><item><title><![CDATA[Reply to Inhalt von Vector in Listenfeld on Thu, 18 Mar 2004 08:39:45 GMT]]></title><description><![CDATA[<p>andy_mann schrieb:</p>
<blockquote>
<p>Wieso ist die Unbekannt ??</p>
</blockquote>
<p>Naja, ich kenne CServerListe nicht. Ohne zu wissen wie die Klasse ausschaut kann man Dir nur sehr allgemeine Tips geben !?</p>
<pre><code class="language-cpp">#include &lt;vector&gt;

class test
{
public:
	typedef std::vector&lt;int&gt; MyInternalVec ;
	test()
	{
		for(int i = 0;i&lt;100;++i)
			myVec.push_back(i);
	}
	const MyInternalVec &amp; getvec()
	{
		return myVec;
	}

private:
	std::vector&lt;int&gt; myVec;

};

using namespace std;
int main(int argc, char * argv[])
{
	test t;
	const test::MyInternalVec &amp; vec = t.getvec();

	for(test::MyInternalVec::const_iterator pos = vec.begin();pos != vec.end();++pos)
		cout&lt;&lt;*pos&lt;&lt;'\n';

	return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/483251</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/483251</guid><dc:creator><![CDATA[Knuddlbaer]]></dc:creator><pubDate>Thu, 18 Mar 2004 08:39:45 GMT</pubDate></item></channel></rss>