also wie der titel scho sagt würde ich mir gerne mit c++ selber ein lernprogramm basteln....
so etz hab ich folgendes problem...
Ich programmiere noch nicht so lange und beutzte c++ Builder 6
ich hab jetzt eine edit feld erstellt wo man später das Deutsche wort reinschreibt und auf einem label soll die das englische word stehen.
so...
dann hab ich noch ein button erstellt um auf ok drücken zu können wenn es richtig kommt richtig und wenns falsch is soll falsch angezeigt werden.
so kann mir jemand helfen wie das funktioniert....
ich hab etz so als beispiel des gemacht:
TForm1 *Form1;
int Vocabeln, ja, Nr, yes;
const int Max = 1;
String Vocabeln1[Max];
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Vocabeln = StrToInt (Edit1->Text);
if (Vocabeln == ja) Button1->Caption = "richtig";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
randomize ();
Vocabeln1[0] = "Yes";
Nr = random (Max);
Label1->Caption = Vocabeln1[Nr];
}
//---------------------------------------------------------------------------
so weiter weiß ich auch nicht mehr...
Wie mach ich des etz, das wenn das label wie in meinem fall yes ist man in dem edit feld ja eingibt und dann richtig kommt ?
danke jetzt schon mal für die hilfe
so etz hab ich folgendes problem...
Ich programmiere noch nicht so lange und beutzte c++ Builder 6
ich hab jetzt eine edit feld erstellt wo man später das Deutsche wort reinschreibt und auf einem label soll die das englische word stehen.
so...
dann hab ich noch ein button erstellt um auf ok drücken zu können wenn es richtig kommt richtig und wenns falsch is soll falsch angezeigt werden.
so kann mir jemand helfen wie das funktioniert....
ich hab etz so als beispiel des gemacht:
TForm1 *Form1;
int Vocabeln, ja, Nr, yes;
const int Max = 1;
String Vocabeln1[Max];
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Vocabeln = StrToInt (Edit1->Text);
if (Vocabeln == ja) Button1->Caption = "richtig";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
randomize ();
Vocabeln1[0] = "Yes";
Nr = random (Max);
Label1->Caption = Vocabeln1[Nr];
}
//---------------------------------------------------------------------------
so weiter weiß ich auch nicht mehr...
Wie mach ich des etz, das wenn das label wie in meinem fall yes ist man in dem edit feld ja eingibt und dann richtig kommt ?
danke jetzt schon mal für die hilfe