<?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[Problem beim Ratespiel]]></title><description><![CDATA[<p>Hallo,<br />
ich wollte mir ein Ratespiel machen (mit dem C++ Builder)<br />
hab alles so gemacht wie es im Buch steht aber wenn ich dann auf Start drücke zeigt der pc mir das :<br />
//---------------------------------------------------------------------------</p>
<p>#include &lt;vcl.h&gt;<br />
#pragma hdrstop</p>
<p>#include &quot;Unit1.h&quot;<br />
//---------------------------------------------------------------------------<br />
#pragma package(smart_init)<br />
#pragma resource &quot;*.dfm&quot;<br />
TForm1 <em>Form1;<br />
int Eingabe, Zufall, Edit1;<br />
//---------------------------------------------------------------------------<br />
__fastcall TForm1::TForm1(TComponent</em> Owner)<br />
: TForm(Owner)<br />
{<br />
}<br />
//---------------------------------------------------------------------------</p>
<p>void __fastcall TForm1::Button1Click(TObject <em>Sender)<br />
{<br />
[Edit1-&gt;SetFocus();]<br />
Eingabe = StrToInt [(Edit1-&gt;Text);]<br />
if (Eingabe == Zufall)<br />
Label1-&gt;Caption = &quot;Richtig geraten!&quot;;<br />
if (Eingabe &lt; Zufall)<br />
Label1-&gt;Caption = &quot;Deine Zahl ist zu klein!&quot;;<br />
if (Eingabe &gt; Zufall)<br />
Label1-&gt;Caption = &quot;Seine Zahl ist zu groß!&quot;;<br />
}<br />
//---------------------------------------------------------------------------<br />
[C++ Fehler] Unit1.cpp(22): E2288 Zeiger auf Struktur auf linker Seite von -&gt; oder von -&gt;</em> erforderlich*<br />
[C++ Fehler] Unit1.cpp(21): E2288 Zeiger auf Struktur auf linker Seite von -&gt; oder von -&gt;* erforderlich*</p>
<p>der fehler soll dort wo in eckige klammern gestzt hab<br />
kann mir einer helfen ??</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/147590/problem-beim-ratespiel</link><generator>RSS for Node</generator><lastBuildDate>Thu, 06 Aug 2026 07:05:22 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/147590.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 May 2006 12:29:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem beim Ratespiel on Thu, 18 May 2006 12:29:57 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich wollte mir ein Ratespiel machen (mit dem C++ Builder)<br />
hab alles so gemacht wie es im Buch steht aber wenn ich dann auf Start drücke zeigt der pc mir das :<br />
//---------------------------------------------------------------------------</p>
<p>#include &lt;vcl.h&gt;<br />
#pragma hdrstop</p>
<p>#include &quot;Unit1.h&quot;<br />
//---------------------------------------------------------------------------<br />
#pragma package(smart_init)<br />
#pragma resource &quot;*.dfm&quot;<br />
TForm1 <em>Form1;<br />
int Eingabe, Zufall, Edit1;<br />
//---------------------------------------------------------------------------<br />
__fastcall TForm1::TForm1(TComponent</em> Owner)<br />
: TForm(Owner)<br />
{<br />
}<br />
//---------------------------------------------------------------------------</p>
<p>void __fastcall TForm1::Button1Click(TObject <em>Sender)<br />
{<br />
[Edit1-&gt;SetFocus();]<br />
Eingabe = StrToInt [(Edit1-&gt;Text);]<br />
if (Eingabe == Zufall)<br />
Label1-&gt;Caption = &quot;Richtig geraten!&quot;;<br />
if (Eingabe &lt; Zufall)<br />
Label1-&gt;Caption = &quot;Deine Zahl ist zu klein!&quot;;<br />
if (Eingabe &gt; Zufall)<br />
Label1-&gt;Caption = &quot;Seine Zahl ist zu groß!&quot;;<br />
}<br />
//---------------------------------------------------------------------------<br />
[C++ Fehler] Unit1.cpp(22): E2288 Zeiger auf Struktur auf linker Seite von -&gt; oder von -&gt;</em> erforderlich*<br />
[C++ Fehler] Unit1.cpp(21): E2288 Zeiger auf Struktur auf linker Seite von -&gt; oder von -&gt;* erforderlich*</p>
<p>der fehler soll dort wo in eckige klammern gestzt hab<br />
kann mir einer helfen ??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1060109</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1060109</guid><dc:creator><![CDATA[Freaky_Ice]]></dc:creator><pubDate>Thu, 18 May 2006 12:29:57 GMT</pubDate></item><item><title><![CDATA[Reply to Problem beim Ratespiel on Thu, 18 May 2006 12:32:32 GMT]]></title><description><![CDATA[<p>1. [ cpp] Tags benutzen, das kann man so nicht recht lesen.<br />
2. Ins Builder-Subforum gehen <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="😉"
    /><br />
3. Edit1 ist als Integer deklariert. Ein Integer kann nicht dereferenziert werden und hat schon garkeine Eigenschaft &quot;Text&quot;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1060111</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1060111</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Thu, 18 May 2006 12:32:32 GMT</pubDate></item><item><title><![CDATA[Reply to Problem beim Ratespiel on Thu, 18 May 2006 12:50:12 GMT]]></title><description><![CDATA[<p>und packe das hier<br />
int Eingabe, Zufall;<br />
besser in den Header unter private:</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1060121</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1060121</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Thu, 18 May 2006 12:50:12 GMT</pubDate></item><item><title><![CDATA[Reply to Problem beim Ratespiel on Thu, 18 May 2006 15:01:52 GMT]]></title><description><![CDATA[<p>Danke für die schnellen Antworten .....aber da ich C++ gerade lerne hab ich jetzt nicht verstanden was ich machen muss ...hier nochmal in diesem</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------

#include &lt;vcl.h&gt;
#pragma hdrstop

#include &quot;Raten.h&quot;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
TForm1 *Form1;
int Zufall, Eingabe;

//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{

  Edit1-&gt;SetFocus ();
  Eingabe = StrToInt (Edit1-&gt;Text);
  if (Eingabe == Zufall) Label1-&gt;Caption = &quot;Richtig geraten!&quot;;
  if (Eingabe &lt; Zufall) Label1-&gt;Caption = &quot;Deine Zahl ist zu klein!&quot;;
  if (Eingabe &gt; Zufall) Label1-&gt;Caption = &quot;Deine Zahl ist zu groß!&quot;;
}
//---------------------------------------------------------------------------
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1060249</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1060249</guid><dc:creator><![CDATA[Freaky_Ice]]></dc:creator><pubDate>Thu, 18 May 2006 15:01:52 GMT</pubDate></item><item><title><![CDATA[Reply to Problem beim Ratespiel on Thu, 18 May 2006 15:16:25 GMT]]></title><description><![CDATA[<p>Wo belegst du denn Zufall?<br />
Du solltest noch um das StrToInt einen try/catch-Block schreiben um fehlerhafte Eingaben zu vermeiden. Oder du verwendest statt dessen StrToIntDef.<br />
Vielleicht sollte ein Mod diesen Thread mal in das BCB-Forum verschieben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1060253</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1060253</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Thu, 18 May 2006 15:16:25 GMT</pubDate></item><item><title><![CDATA[Reply to Problem beim Ratespiel on Fri, 19 May 2006 09:47:44 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=403" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=2" rel="nofollow">VCL/CLX (Borland C++ Builder)</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/1060755</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1060755</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Fri, 19 May 2006 09:47:44 GMT</pubDate></item></channel></rss>