<?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[Formate überprüfen bringt Fehler]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte gern Formate von Variablen überprüfen, nur wenn alle gleich sind, soll die Anwendung weiter ausgeführt werden, mein Ansatz ist:</p>
<pre><code>//Formate werden abgefragt
llFrameFormat_t InFormat    = In-&gt;frameformat;
llFrameFormat_t OutFormat   = Out-&gt;frameformat;
llFrameFormat_t AddFormat   = Add-&gt;frameformat;
llFrameFormat_t MultFormat  = Mult-&gt;frameformat;

if(InFormat == OutFormat == AddFormat)
{
 //weitere Funktionen
}
</code></pre>
<p>Allerdings bringt es mir den Fehler: Illegal structure operation in der if() Zeile.<br />
Was ist daran falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/81116/formate-überprüfen-bringt-fehler</link><generator>RSS for Node</generator><lastBuildDate>Tue, 30 Jun 2026 16:11:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/81116.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Jul 2004 06:58:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Formate überprüfen bringt Fehler on Wed, 28 Jul 2004 06:58:59 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte gern Formate von Variablen überprüfen, nur wenn alle gleich sind, soll die Anwendung weiter ausgeführt werden, mein Ansatz ist:</p>
<pre><code>//Formate werden abgefragt
llFrameFormat_t InFormat    = In-&gt;frameformat;
llFrameFormat_t OutFormat   = Out-&gt;frameformat;
llFrameFormat_t AddFormat   = Add-&gt;frameformat;
llFrameFormat_t MultFormat  = Mult-&gt;frameformat;

if(InFormat == OutFormat == AddFormat)
{
 //weitere Funktionen
}
</code></pre>
<p>Allerdings bringt es mir den Fehler: Illegal structure operation in der if() Zeile.<br />
Was ist daran falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/570040</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/570040</guid><dc:creator><![CDATA[Sonnenschein84]]></dc:creator><pubDate>Wed, 28 Jul 2004 06:58:59 GMT</pubDate></item><item><title><![CDATA[Reply to Formate überprüfen bringt Fehler on Wed, 28 Jul 2004 07:02:44 GMT]]></title><description><![CDATA[<p>bin mir net ganz sicher, aber probiers mal so:</p>
<pre><code class="language-cpp">if((InFormat == OutFormat) == AddFormat)
</code></pre>
<p>alternativ muss das gehen:</p>
<pre><code class="language-cpp">if((InFormat == OutFormat) &amp;&amp;  (OutFormat== AddFormat))
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/570042</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/570042</guid><dc:creator><![CDATA[Zwerg23]]></dc:creator><pubDate>Wed, 28 Jul 2004 07:02:44 GMT</pubDate></item><item><title><![CDATA[Reply to Formate überprüfen bringt Fehler on Wed, 28 Jul 2004 07:08:44 GMT]]></title><description><![CDATA[<p>bei</p>
<pre><code>if(InFormat == OutFormat)
</code></pre>
<p>kam derselbe Fehler, aber so wirklich weiß ich noch nicht warum, weil meiner Meinung nach sollte das schon gehen oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/570047</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/570047</guid><dc:creator><![CDATA[Sonnenschein84]]></dc:creator><pubDate>Wed, 28 Jul 2004 07:08:44 GMT</pubDate></item><item><title><![CDATA[Reply to Formate überprüfen bringt Fehler on Wed, 28 Jul 2004 07:17:24 GMT]]></title><description><![CDATA[<p>Ist der == Oparator bei dem Typ llFrameFormat_t überhaupt vorhanden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/570057</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/570057</guid><dc:creator><![CDATA[Zwerg23]]></dc:creator><pubDate>Wed, 28 Jul 2004 07:17:24 GMT</pubDate></item><item><title><![CDATA[Reply to Formate überprüfen bringt Fehler on Wed, 28 Jul 2004 07:24:13 GMT]]></title><description><![CDATA[<p>darin kann natürlich der fehler liegen, aber das kann ich nicht zu 100% sagen, weil ich in einem Projekt von jemand anders arbeite. Aber ich werde mal auf die Suche gehen, vielleicht find ich ja was dazu raus! Danke dir erstmal!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/570066</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/570066</guid><dc:creator><![CDATA[Sonnenschein84]]></dc:creator><pubDate>Wed, 28 Jul 2004 07:24:13 GMT</pubDate></item><item><title><![CDATA[Reply to Formate überprüfen bringt Fehler on Wed, 28 Jul 2004 07:29:01 GMT]]></title><description><![CDATA[<p>so ist das angelegt:</p>
<pre><code>typedef struct llFrameFormat_tag
{
  llPixelFormat_t id_format;
  u_int32_t       cnt_width;
  u_int32_t       cnt_height;
}llFrameFormat_t;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/570070</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/570070</guid><dc:creator><![CDATA[Sonnenschein84]]></dc:creator><pubDate>Wed, 28 Jul 2004 07:29:01 GMT</pubDate></item><item><title><![CDATA[Reply to Formate überprüfen bringt Fehler on Wed, 28 Jul 2004 07:33:29 GMT]]></title><description><![CDATA[<p>Das sieht dann eher nicht so aus, als wäre der Operator == überladen... Dann kann das auch nicht funktionieren...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/570077</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/570077</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 28 Jul 2004 07:33:29 GMT</pubDate></item><item><title><![CDATA[Reply to Formate überprüfen bringt Fehler on Wed, 28 Jul 2004 07:36:39 GMT]]></title><description><![CDATA[<p>Ok danke. Muss dann mal sehen wie ich das irgendwie anders teste</p>
]]></description><link>https://www.c-plusplus.net/forum/post/570079</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/570079</guid><dc:creator><![CDATA[Sonnenschein84]]></dc:creator><pubDate>Wed, 28 Jul 2004 07:36:39 GMT</pubDate></item><item><title><![CDATA[Reply to Formate überprüfen bringt Fehler on Wed, 28 Jul 2004 07:41:50 GMT]]></title><description><![CDATA[<p>Wenn Du die Struktur nicht ändern / ergänzen darfst, würde ich eine Vergleichsfunktion schreiben, der Du die beiden ll_FrameFormat_t Objekte übergibst und dort die einzelnen Werte vergleichst..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/570086</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/570086</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 28 Jul 2004 07:41:50 GMT</pubDate></item><item><title><![CDATA[Reply to Formate überprüfen bringt Fehler on Wed, 28 Jul 2004 07:52:11 GMT]]></title><description><![CDATA[<p>Nein ich glaube ich darf dort nichts verändern kann aber auch nicht fragen, da derjenige im Urlaub ist.</p>
<p>Könntest du mir vielleicht deinen Vorschlag etwas näher erläutern, denn so ganz habe ich noch nicht verstanden was du machen möchtest. Würde mich sehr freuen.Meinst du es in etwa so:</p>
<pre><code>void Vergleich(llFrameFormat_t AddFormat, llFrameFormat_t InFormat, llFrameFormat_t OutFormat)
{
}
</code></pre>
<p>?? Und wenn ja was müsste dann in die Funktion hinein?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/570088</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/570088</guid><dc:creator><![CDATA[Sonnenschein84]]></dc:creator><pubDate>Wed, 28 Jul 2004 07:52:11 GMT</pubDate></item><item><title><![CDATA[Reply to Formate überprüfen bringt Fehler on Wed, 28 Jul 2004 08:11:38 GMT]]></title><description><![CDATA[<p>also erstmal sollte deine Funktion was zurückliefern, also</p>
<pre><code class="language-cpp">bool Vergleich(llFrameFormat_t AddFormat, llFrameFormat_t InFormat, llFrameFormat_t OutFormat)
{
....
}
</code></pre>
<p>und nun zum Inhalt: (ewas Umständlich, aber dafür leicht zu verstehen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> )</p>
<pre><code class="language-cpp">if (AddFormat.id_format!= InFormat.id_format) return false;
if (AddFormat.id_format!= OutFormat.id_format) return false;
if (AddFormat.cnt_width!= InFormat.cnt_width) return false;
if (AddFormat.cnt_width!= OutFormat.cnt_width) return false;
if (AddFormat.cnt_height!= InFormat.cnt_height) return false;
if (AddFormat.cnt_height!= OutFormat.cnt_height) return false;
return true;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/570112</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/570112</guid><dc:creator><![CDATA[Zwerg23]]></dc:creator><pubDate>Wed, 28 Jul 2004 08:11:38 GMT</pubDate></item><item><title><![CDATA[Reply to Formate überprüfen bringt Fehler on Wed, 28 Jul 2004 08:18:56 GMT]]></title><description><![CDATA[<p>Ja das sie was zurück geben muss ist mir auch schon eingefallen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";-)"
      alt="😉"
    /> Aber zum Inhalt, das versteh ich nciht wirklich, weil ich muss doch überprüfen ob In, Out &amp; Add vom gleichen Format sind und ein gültiges Format haben und dann muss ich noch prüfen ob Mult vom Format Dword ist, also sah es erst so aus:</p>
<pre><code>llError Vergleich(llFrameFormat_t AddFormat, llFrameFormat_t InFormat, llFrameFormat_t OutFormat, llFrameFormat_t MultFormat)
{
  llError result;
  if((AddFormat != llDword) &amp;&amp; (AddFormat != llInvalidConversion) &amp;&amp; (InFormat != llDword) &amp;&amp; (InFormat != llInvalidConversion) &amp;&amp;(OutFormat != llDword) &amp;&amp; (OutFormat != llInvalidConversion))
  {
    if(AddFormat == InFormat == OutFormat)
    {
      if(MultFormat == llDword)
      {
        result = llSuccess;
      }
    }
  }
  return result;
}
</code></pre>
<p>so geht es ja aber nicht. Also müssen diese Vergleiche doch irgendwie umgeschrieben werden oder seh ich das jetzt komplett falsch? Benötige ich denn jetzt hier das cnt_width und cnt_height?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/570117</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/570117</guid><dc:creator><![CDATA[Sonnenschein84]]></dc:creator><pubDate>Wed, 28 Jul 2004 08:18:56 GMT</pubDate></item><item><title><![CDATA[Reply to Formate überprüfen bringt Fehler on Wed, 28 Jul 2004 09:31:44 GMT]]></title><description><![CDATA[<p>Was willst du überhaupt?<br />
Die ID's geben doch das an was du willst, anders kannst du doch den Typ net überprüfen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/570182</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/570182</guid><dc:creator><![CDATA[Zwerg23]]></dc:creator><pubDate>Wed, 28 Jul 2004 09:31:44 GMT</pubDate></item><item><title><![CDATA[Reply to Formate überprüfen bringt Fehler on Wed, 28 Jul 2004 09:37:37 GMT]]></title><description><![CDATA[<p>Habs jetzt so:</p>
<pre><code>if(AddFormat.id_format == InFormat.id_format == OutFormat.id_format)
  {
    result = llSuccess;
  }
</code></pre>
<p>damit überprüfe ich aber erstens noch nicht ob das Format gültig ist (also es darf nicht llDword und llInvalidConversion sein) und zweitens kann ich damit ja auch noch nicht überprüfen ob MultFormat.id_format == llDword ist, denn das soll es ja sein. Ich will ja nicht nur wissen ob es wirklich dieselben Formate sind, sondern bei den ersten 3en (Add, In &amp; Out) dürfen 2 Formate nicht vorkommen und bei Mult darf nur das eine Format vorkommen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/570187</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/570187</guid><dc:creator><![CDATA[Sonnenschein84]]></dc:creator><pubDate>Wed, 28 Jul 2004 09:37:37 GMT</pubDate></item></channel></rss>