<?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[Probleme mit einem Element eines Structs]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe ein Problem mit einem Element in einem Struct, welches ich anwählen möchte.</p>
<p>Hier mal das Struct:</p>
<pre><code class="language-cpp">struct tFahrwegElementListe
{
	CString elem;
	CString RLFAH;
	CString Fls;
	CString ZelleElem;
	CString ZelleRLFAH;
	CString ZelleFls;

	CString projFwLage;
	CString projDwLage;
	CString projFwRichtung;
	CString projRichtung;
	CString projFwFmElementeVorZielgleis;
	CString projFwAufloesendeElemente;
	CString projFwFlsElemente;
	CString ZelleprojFwLage;
	CString ZelleprojFwRichtung;
	CString ZelleprojRichtung;
	CString ZelleprojFwFmElementeVorZielgleis;
	CString ZelleprojFwAufloesendeElemente;
	CString ZelleprojFwFlsElemente;

	int ZeileInZelle; // zeilennummer, wenn zelle aus mehreren zeilen besteht
	int PosDerZeile;  // elementposition in der zelle, getrennt durch &quot;:&quot;

};
</code></pre>
<p>Das wichtige in diesem struct ist eigentlich nur der CString projDwLage. Diesen habe ich hinzugefügt.</p>
<p>Aufgerufen wird das Element nun durch:</p>
<pre><code class="language-cpp">else if(elem.strSICASParameter ==&quot;projDwLage&quot;)
{
	FahrwegElementListeXls[countXlsListe].projDwLage=tmpZelle;
	FahrwegElementListeXls[countXlsListe].ZelleprojFwLage=row;
	FahrwegElementListeXls[countXlsListe].ZeileInZelle=ElemIdInZelle;
	FahrwegElementListeXls[countXlsListe].PosDerZeile=elem.index;
}
</code></pre>
<p>Dies ist die Fehlermeldung:</p>
<blockquote>
<p>D:\Programming\ScanStdRT\ScanStdRTDlg.cpp(842) : error C2039: 'projDwLage' : Ist kein Element von 'tFahrwegElementListe'<br />
d:\programming\scanstdrt\stdafx.h(36) : Siehe Deklaration von 'tFahrwegElementListe'</p>
</blockquote>
<p>Ohne das Element hat alles funktioniert.<br />
Ist die Anzahl der Elemente, die in ein struct aufgenommen werden können begrenzt? Weil das nun 21 Elemente sind, gehen vielleicht nur 20?<br />
Eine andere Idee habe ich nicht, weil für mich alles richtig aussieht.</p>
<p>Ich hoffe, dass mir jmd. von euch helfen kann.</p>
<p>MfG Thorsten</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/158418/probleme-mit-einem-element-eines-structs</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 19:25:48 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/158418.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 05 Sep 2006 09:05:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Probleme mit einem Element eines Structs on Tue, 05 Sep 2006 09:05:26 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe ein Problem mit einem Element in einem Struct, welches ich anwählen möchte.</p>
<p>Hier mal das Struct:</p>
<pre><code class="language-cpp">struct tFahrwegElementListe
{
	CString elem;
	CString RLFAH;
	CString Fls;
	CString ZelleElem;
	CString ZelleRLFAH;
	CString ZelleFls;

	CString projFwLage;
	CString projDwLage;
	CString projFwRichtung;
	CString projRichtung;
	CString projFwFmElementeVorZielgleis;
	CString projFwAufloesendeElemente;
	CString projFwFlsElemente;
	CString ZelleprojFwLage;
	CString ZelleprojFwRichtung;
	CString ZelleprojRichtung;
	CString ZelleprojFwFmElementeVorZielgleis;
	CString ZelleprojFwAufloesendeElemente;
	CString ZelleprojFwFlsElemente;

	int ZeileInZelle; // zeilennummer, wenn zelle aus mehreren zeilen besteht
	int PosDerZeile;  // elementposition in der zelle, getrennt durch &quot;:&quot;

};
</code></pre>
<p>Das wichtige in diesem struct ist eigentlich nur der CString projDwLage. Diesen habe ich hinzugefügt.</p>
<p>Aufgerufen wird das Element nun durch:</p>
<pre><code class="language-cpp">else if(elem.strSICASParameter ==&quot;projDwLage&quot;)
{
	FahrwegElementListeXls[countXlsListe].projDwLage=tmpZelle;
	FahrwegElementListeXls[countXlsListe].ZelleprojFwLage=row;
	FahrwegElementListeXls[countXlsListe].ZeileInZelle=ElemIdInZelle;
	FahrwegElementListeXls[countXlsListe].PosDerZeile=elem.index;
}
</code></pre>
<p>Dies ist die Fehlermeldung:</p>
<blockquote>
<p>D:\Programming\ScanStdRT\ScanStdRTDlg.cpp(842) : error C2039: 'projDwLage' : Ist kein Element von 'tFahrwegElementListe'<br />
d:\programming\scanstdrt\stdafx.h(36) : Siehe Deklaration von 'tFahrwegElementListe'</p>
</blockquote>
<p>Ohne das Element hat alles funktioniert.<br />
Ist die Anzahl der Elemente, die in ein struct aufgenommen werden können begrenzt? Weil das nun 21 Elemente sind, gehen vielleicht nur 20?<br />
Eine andere Idee habe ich nicht, weil für mich alles richtig aussieht.</p>
<p>Ich hoffe, dass mir jmd. von euch helfen kann.</p>
<p>MfG Thorsten</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1131326</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1131326</guid><dc:creator><![CDATA[Tupamann]]></dc:creator><pubDate>Tue, 05 Sep 2006 09:05:26 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit einem Element eines Structs on Tue, 05 Sep 2006 09:19:40 GMT]]></title><description><![CDATA[<p>Hast du schon ein Clean/Rebuild versucht?</p>
<p>Das structs begrenzt sind wär mir neu.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1131332</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1131332</guid><dc:creator><![CDATA[Kompeiler]]></dc:creator><pubDate>Tue, 05 Sep 2006 09:19:40 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit einem Element eines Structs on Tue, 05 Sep 2006 09:31:20 GMT]]></title><description><![CDATA[<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /><br />
Ich Nase <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
<p>Ja, so gehts...ich versteh das nicht. Wieso muss man das immer so machen? Und warum komm ich nicht auf sowas...obwohl mir sowas schon mal passiert ist??</p>
<p>Naja, Danke für die schnelle und unkomplizierte Lösung^^</p>
<p>Gruß, Thorsten</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1131340</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1131340</guid><dc:creator><![CDATA[Tupamann]]></dc:creator><pubDate>Tue, 05 Sep 2006 09:31:20 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit einem Element eines Structs on Tue, 05 Sep 2006 09:37:46 GMT]]></title><description><![CDATA[<p>bin da nicht so firm, aber ich dachte, der stdafx.h (wo du wahrscheinlich die struct definiert hast) ist ein präkompeild header, und wird nicht bei jedem build neu übersetzt.<br />
vielleicht kann das jemand mit mehr wissen bestätigen..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1131346</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1131346</guid><dc:creator><![CDATA[Kompeiler]]></dc:creator><pubDate>Tue, 05 Sep 2006 09:37:46 GMT</pubDate></item></channel></rss>