<?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[hangman]]></title><description><![CDATA[<pre><code class="language-cpp">//---------------------------------------------------------------------------
#include &lt;vcl.h&gt;
#pragma hdrstop
#include &quot;Stdlib.h&quot;
#include &quot;Unit1.h&quot;
#include &quot;time.h&quot;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
TForm1 *Form1;
String Zufallswort;
int Fehler;
randomize();
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button2Click(TObject *Sender)
{
Close();    
}
//---------------------------------------------------------------------------

void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &amp;Action)
{
Action=caFree;    
}
//---------------------------------------------------------------------------

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

 int x,zufall;
 char Zeichen;
 zufall=random(ListBox1-&gt;Items-&gt;Count);
 Zufallswort=ListBox1-&gt;Items-&gt;Strings[zufall];

 Label1-&gt;Caption=&quot;&quot;;
  for (x=1;x&lt;=Zufallswort.Length();x++)
   {
 Label1-&gt;Caption=Label1-&gt;Caption+&quot;.&quot;;
  }
  Label1-&gt;Visible=true;

  Zeichen='A';

    for (x=0;x&lt;26;x++)
    {
    StringGrid1-&gt;ColWidths[x]=20;
    StringGrid1-&gt;Cells[x][0]=Zeichen;
    Zeichen++;
    }
    StringGrid1-&gt;Visible=true;
    Fehler=0;
    Label4-&gt;Visible=false;

}
//---------------------------------------------------------------------------
void __fastcall TForm1::StringGrid1Click(TObject *Sender)
{
 int stelle,x;
 char buchstabe;
 String Reserve, Dateiname;
 boolean gefunden;
 gefunden=false;

 Reserve=Label1-&gt;Caption;
 stelle=StringGrid1-&gt;Col;
 buchstabe=StringGrid1-&gt;Cells[stelle][0][1];
 StringGrid1-&gt;Cells[stelle][0]=&quot; &quot;;
      for (x=1;x&lt;=Zufallswort.Length();x++)
      {
        if (Zufallswort[x]==buchstabe)
        {
          Reserve[x]=buchstabe;
          gefunden=true;
        }
      }
 if (gefunden==false)
 {
  Fehler++;
  Dateiname=IntToStr(Fehler)+&quot;.bmp&quot;;
  Image1-&gt;Picture-&gt;LoadFromFile(Dateiname);

 }

 Label1-&gt;Caption=Reserve;
 if (Zufallswort==Label1-&gt;Caption)
 {
 StringGrid1-&gt;Visible=false;
 Label4-&gt;Visible=true;
 }
   if (Fehler==9)
   {

    StringGrid1-&gt;Visible=false;
    Label4-&gt;Caption=&quot;Es wäre &quot;+Zufallswort&quot; gewesen.&quot;;

    MediaPlayer1-&gt;FileName=&quot;beam.wav&quot;;
    MediaPlayer1-&gt;Play();
 }

}
//---------------------------------------------------------------------------

void __fastcall TForm1::Ende1Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Stufe11Click(TObject *Sender)
{
 //ListBox1-&gt;Items-&gt;LoadFromFile
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Stufe21Click(TObject *Sender)
{
 //ListBox1-&gt;Items-&gt;LoadFromFile
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Stufe31Click(TObject *Sender)
{
 //ListBox1-&gt;Items-&gt;LoadFromFile ???????
}
//---------------------------------------------------------------------------
</code></pre>
<p>hallo hab hier fehler drinnen.<br />
bei der zeile</p>
<pre><code class="language-cpp">Label4-&gt;Caption=&quot;Es wäre &quot;+Zufallswort&quot; gewesen.&quot;;
</code></pre>
<p>fehlt angeblich ein strichpunkt?</p>
<p>Und wenn ich das wort erraten habe soll der sound &quot;tada.wav&quot; abgespielt werden.<br />
und wenn ich es nicht erraten habe dann &quot;beam.wav&quot;. habs eh schon IRGENTWIE eingebaut....<br />
die dateien sind im selben ordner übrigenz.</p>
<p>Und unten beim Befehl will ich noch zusammenbekommen, dass wenn ich in meinem menü stufe 1 anklicke die liste &quot;1.lst&quot;, die im selben Ordner ist geladen wird und eine zufallszahl davon geladen wird.<br />
und das geht bis stufe drei!</p>
<p>bitte helfen! danke vielmals!<br />
PS: die c++-b hilfe geht bei mir NOCH nicht!<br />
mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/179726/hangman</link><generator>RSS for Node</generator><lastBuildDate>Sat, 15 Aug 2026 13:48:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/179726.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 24 Apr 2007 18:11:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to hangman on Tue, 24 Apr 2007 18:11:18 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">//---------------------------------------------------------------------------
#include &lt;vcl.h&gt;
#pragma hdrstop
#include &quot;Stdlib.h&quot;
#include &quot;Unit1.h&quot;
#include &quot;time.h&quot;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
TForm1 *Form1;
String Zufallswort;
int Fehler;
randomize();
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button2Click(TObject *Sender)
{
Close();    
}
//---------------------------------------------------------------------------

void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &amp;Action)
{
Action=caFree;    
}
//---------------------------------------------------------------------------

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

 int x,zufall;
 char Zeichen;
 zufall=random(ListBox1-&gt;Items-&gt;Count);
 Zufallswort=ListBox1-&gt;Items-&gt;Strings[zufall];

 Label1-&gt;Caption=&quot;&quot;;
  for (x=1;x&lt;=Zufallswort.Length();x++)
   {
 Label1-&gt;Caption=Label1-&gt;Caption+&quot;.&quot;;
  }
  Label1-&gt;Visible=true;

  Zeichen='A';

    for (x=0;x&lt;26;x++)
    {
    StringGrid1-&gt;ColWidths[x]=20;
    StringGrid1-&gt;Cells[x][0]=Zeichen;
    Zeichen++;
    }
    StringGrid1-&gt;Visible=true;
    Fehler=0;
    Label4-&gt;Visible=false;

}
//---------------------------------------------------------------------------
void __fastcall TForm1::StringGrid1Click(TObject *Sender)
{
 int stelle,x;
 char buchstabe;
 String Reserve, Dateiname;
 boolean gefunden;
 gefunden=false;

 Reserve=Label1-&gt;Caption;
 stelle=StringGrid1-&gt;Col;
 buchstabe=StringGrid1-&gt;Cells[stelle][0][1];
 StringGrid1-&gt;Cells[stelle][0]=&quot; &quot;;
      for (x=1;x&lt;=Zufallswort.Length();x++)
      {
        if (Zufallswort[x]==buchstabe)
        {
          Reserve[x]=buchstabe;
          gefunden=true;
        }
      }
 if (gefunden==false)
 {
  Fehler++;
  Dateiname=IntToStr(Fehler)+&quot;.bmp&quot;;
  Image1-&gt;Picture-&gt;LoadFromFile(Dateiname);

 }

 Label1-&gt;Caption=Reserve;
 if (Zufallswort==Label1-&gt;Caption)
 {
 StringGrid1-&gt;Visible=false;
 Label4-&gt;Visible=true;
 }
   if (Fehler==9)
   {

    StringGrid1-&gt;Visible=false;
    Label4-&gt;Caption=&quot;Es wäre &quot;+Zufallswort&quot; gewesen.&quot;;

    MediaPlayer1-&gt;FileName=&quot;beam.wav&quot;;
    MediaPlayer1-&gt;Play();
 }

}
//---------------------------------------------------------------------------

void __fastcall TForm1::Ende1Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Stufe11Click(TObject *Sender)
{
 //ListBox1-&gt;Items-&gt;LoadFromFile
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Stufe21Click(TObject *Sender)
{
 //ListBox1-&gt;Items-&gt;LoadFromFile
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Stufe31Click(TObject *Sender)
{
 //ListBox1-&gt;Items-&gt;LoadFromFile ???????
}
//---------------------------------------------------------------------------
</code></pre>
<p>hallo hab hier fehler drinnen.<br />
bei der zeile</p>
<pre><code class="language-cpp">Label4-&gt;Caption=&quot;Es wäre &quot;+Zufallswort&quot; gewesen.&quot;;
</code></pre>
<p>fehlt angeblich ein strichpunkt?</p>
<p>Und wenn ich das wort erraten habe soll der sound &quot;tada.wav&quot; abgespielt werden.<br />
und wenn ich es nicht erraten habe dann &quot;beam.wav&quot;. habs eh schon IRGENTWIE eingebaut....<br />
die dateien sind im selben ordner übrigenz.</p>
<p>Und unten beim Befehl will ich noch zusammenbekommen, dass wenn ich in meinem menü stufe 1 anklicke die liste &quot;1.lst&quot;, die im selben Ordner ist geladen wird und eine zufallszahl davon geladen wird.<br />
und das geht bis stufe drei!</p>
<p>bitte helfen! danke vielmals!<br />
PS: die c++-b hilfe geht bei mir NOCH nicht!<br />
mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1272697</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1272697</guid><dc:creator><![CDATA[LoSt]]></dc:creator><pubDate>Tue, 24 Apr 2007 18:11:18 GMT</pubDate></item><item><title><![CDATA[Reply to hangman on Tue, 24 Apr 2007 18:19:14 GMT]]></title><description><![CDATA[<p>Hallo</p>
<blockquote>
<p>bei der zeile<br />
...<br />
fehlt angeblich ein strichpunkt?</p>
</blockquote>
<pre><code class="language-cpp">C/C++ Code:
Label4-&gt;Caption=&quot;Es wäre &quot;+Zufallswort + &quot; gewesen.&quot;;
</code></pre>
<blockquote>
<p>Und wenn ich das wort erraten habe soll der sound &quot;tada.wav&quot; abgespielt werden.<br />
und wenn ich es nicht erraten habe dann &quot;beam.wav&quot;. habs eh schon IRGENTWIE eingebaut....<br />
die dateien sind im selben ordner übrigenz.</p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> Und was willst du nun von uns wissen?</p>
<blockquote>
<p>Und unten beim Befehl will ich noch zusammenbekommen, dass wenn ich in meinem menü stufe 1 anklicke die liste &quot;1.lst&quot;, die im selben Ordner ist geladen wird und eine zufallszahl davon geladen wird.</p>
</blockquote>
<p>Ist es so schwer den bereits vorhandenen Aufruf noch zu vervollständigen?</p>
<pre><code class="language-cpp">ListBox1-&gt;Items-&gt;LoadFromFile(&quot;1.lst&quot;);
</code></pre>
<blockquote>
<p>die c++-b hilfe geht bei mir NOCH nicht!</p>
</blockquote>
<p>Was soll denn da nicht gehen? Die Hilfe wird immer mit installiert...</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1272705</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1272705</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 24 Apr 2007 18:19:14 GMT</pubDate></item><item><title><![CDATA[Reply to hangman on Tue, 24 Apr 2007 18:22:47 GMT]]></title><description><![CDATA[<blockquote>
<p>Und was willst du nun von uns wissen?</p>
</blockquote>
<p>Wies geht. Kannst du das irgenwtie einbaun?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1272711</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1272711</guid><dc:creator><![CDATA[LoSt]]></dc:creator><pubDate>Tue, 24 Apr 2007 18:22:47 GMT</pubDate></item><item><title><![CDATA[Reply to hangman on Tue, 24 Apr 2007 18:30:42 GMT]]></title><description><![CDATA[<p>Hallo</p>
<pre><code class="language-cpp">MediaPlayer1-&gt;FileName=&quot;beam.wav&quot;;
    MediaPlayer1-&gt;Play();
</code></pre>
<p>Und was gefällt dir daran nicht?</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1272720</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1272720</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 24 Apr 2007 18:30:42 GMT</pubDate></item><item><title><![CDATA[Reply to hangman on Wed, 25 Apr 2007 17:36:53 GMT]]></title><description><![CDATA[<p>akari schrieb:</p>
<blockquote>
<p>Hallo</p>
<pre><code class="language-cpp">MediaPlayer1-&gt;FileName=&quot;beam.wav&quot;;
    MediaPlayer1-&gt;Play();
</code></pre>
<p>Und was gefällt dir daran nicht?</p>
<p>bis bald<br />
akari</p>
</blockquote>
<p>ja WO gehört es hin?<br />
oder ist es eh schon an der richtigen position?<br />
und wo gehört der sound hin, wenn man es nicht erraten hat?</p>
<p>und was ist an dem ausdruck falsch</p>
<pre><code class="language-cpp">Label4-&gt;Caption=&quot;Es wäre &quot;+Zufallswort + &quot; gewesen.&quot;;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1273453</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1273453</guid><dc:creator><![CDATA[LoSt]]></dc:creator><pubDate>Wed, 25 Apr 2007 17:36:53 GMT</pubDate></item><item><title><![CDATA[Reply to hangman on Wed, 25 Apr 2007 18:04:37 GMT]]></title><description><![CDATA[<p>bin zwar nicht der profi aber vielleicht liegt es am &quot;+&quot; das fehlt doch ein leerzeichen oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1273476</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1273476</guid><dc:creator><![CDATA[Eisi]]></dc:creator><pubDate>Wed, 25 Apr 2007 18:04:37 GMT</pubDate></item><item><title><![CDATA[Reply to hangman on Thu, 26 Apr 2007 08:05:57 GMT]]></title><description><![CDATA[<p>Nein.<br />
Im Orginalcode fehlte das +. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Leerzeichen zwischen Operatoren sind nicht unbedingt von Nöten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1273733</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1273733</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Thu, 26 Apr 2007 08:05:57 GMT</pubDate></item><item><title><![CDATA[Reply to hangman on Fri, 27 Apr 2007 14:51:27 GMT]]></title><description><![CDATA[<p>Danke für die Hilfe!<br />
Bekomme aber noch einen Runtime-error. Also beim 9. Fehler kommt er.<br />
Also stimmt da was nicht:<br />
oder?</p>
<p>if (Fehler==9)<br />
{</p>
<p>StringGrid1-&gt;Visible=false;<br />
Label4-&gt;Caption=&quot;Es wäre &quot;+Zufallswort + &quot; gewesen.&quot;;</p>
<p>MediaPlayer1-&gt;FileName=&quot;beam.wav&quot;;<br />
MediaPlayer1-&gt;Play();<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1274699</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1274699</guid><dc:creator><![CDATA[LoSt]]></dc:creator><pubDate>Fri, 27 Apr 2007 14:51:27 GMT</pubDate></item><item><title><![CDATA[Reply to hangman on Fri, 27 Apr 2007 15:14:13 GMT]]></title><description><![CDATA[<p>Generell würde ich ja sagen, nutze den Debugger. Aber in Deinem Fall solltest Du mal in der Hilfe von TMediaPlayer Dir die Methode Open() genauer anschauen. Da gibt es sogar ein Beispiel!!!</p>
<p>Gruss</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1274708</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1274708</guid><dc:creator><![CDATA[Rostfrei**]]></dc:creator><pubDate>Fri, 27 Apr 2007 15:14:13 GMT</pubDate></item><item><title><![CDATA[Reply to hangman on Fri, 27 Apr 2007 15:45:54 GMT]]></title><description><![CDATA[<p>Kannst es mir ja sagen wies geht...</p>
<p>in meinem ersten post:</p>
<blockquote>
<p>bitte helfen! danke vielmals!<br />
PS: die c++-b hilfe geht bei mir NOCH nicht!</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1274717</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1274717</guid><dc:creator><![CDATA[LoSt]]></dc:creator><pubDate>Fri, 27 Apr 2007 15:45:54 GMT</pubDate></item><item><title><![CDATA[Reply to hangman on Fri, 27 Apr 2007 16:16:38 GMT]]></title><description><![CDATA[<p>imho kann man nicht effektiv ohne die Hilfe arbeiten. Deshalb hier ein Auszug:</p>
<pre><code>char sWinDir[255];

GetWindowsDirectory(sWinDir, sizeof(sWinDir));
MediaPlayer1-&gt;FileName = AnsiString(sWinDir) + &quot;\\Clock.avi&quot;; //specify video file
MediaPlayer1-&gt;DeviceType = dtAVIVideo; //set Device compatibility to AVI
MediaPlayer1-&gt;Display = Panel1; //Set display device to a TPanel
MediaPlayer1-&gt;Open();
MediaPlayer1-&gt;Play();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1274726</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1274726</guid><dc:creator><![CDATA[Rostfrei**]]></dc:creator><pubDate>Fri, 27 Apr 2007 16:16:38 GMT</pubDate></item></channel></rss>