Du bist nicht angemeldet.

Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!

Werbeanzeige

Anonymous

unregistriert

1

05.10.2008, 18:38

Problem mit Mathe-Experte 2

Hallo, es sind Probleme bei meinem Projekt aufgetreten die ich garnicht verstehe! Kann also nicht vieles Sagen!

C-/C++-Quelltext

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
#include <iostream>
#include <string>
#include <windows.h>
#include "Spielen.hpp"

using namespace std;
int Optionen (float Auswahl, string &Spielername, int &RichtigeAntworten, int &FalscheAntworten);
int Sonstiges (float Auswahl, string Spielername, int &RichtigeAntworten, int &FalscheAntworten);

int main ()
{
    float Auswahl = 0;
    string Spielername;
    int RichtigeAntworten = 0;
    int FalscheAntworten = 0;

    srand (timeGetTime ());

    cout << "Spielername: ";
    cin >> Spielername;
    cout << "\n\n\n";

    while (Auswahl != 4)
    {
        cout << "MATHE-EXPERTE 2" << endl;
        cout << "~~~~~~~~~~~~~~~" << endl;
        cout << "1) Spielen" << endl;
        cout << "2) Sonstiges" << endl;
        cout << "3) Optionen" << endl;
        cout << "4) Beenden" << endl;
        cout << "~~~~" << endl;
        cout << "Deine Wahl: ";
        cin >> Auswahl;
        cout << "\n\n\n";

        if (Auswahl == 1)
        {
            Spielen (Auswahl, Spielername, RichtigeAntworten, FalscheAntworten);
        }

        else if (Auswahl == 2)
        {
            Sonstiges (Auswahl, Spielername, RichtigeAntworten, FalscheAntworten);
        }

        else if (Auswahl == 3)
        {
            Optionen (Auswahl, Spielername, RichtigeAntworten, FalscheAntworten);
        }

        else if (Auswahl == 4)
        {
        }

        else
        {
            cout << "ERROR: Falsche Eingabe!" << endl;
            cout << "\n\n\n";

            if (!cin.good ())
            {
                cin.clear ();
                cin.ignore ();
            }
        }
    } // while


    return 0;
}

int Optionen (float Auswahl, string &Spielername, int &RichtigeAntworten, int &FalscheAntworten)
{
    cout << "OPTIONEN" << endl;
    cout << "~~~~~~~~" << endl;
    cout << "1) Statistik" << endl;
    cout << "2) LiesMich" << endl;
    cout << "3) Spielername aendern" << endl;
    cout << "4) Zurueck" << endl;
    cout << "~~~~" << endl;
    cout << "Deine Wahl: ";
    cin >> Auswahl;
    cout << "\n\n\n";

    if (Auswahl == 1)
    {
        cout << "~~~~~~~~~~~~~~~~~~~~~" << endl;
        cout << "Spielername        : " << Spielername << endl;
        cout << "Richtige Antworten : " << RichtigeAntworten << endl;
        cout << "Falsche Antworten  : " << FalscheAntworten << endl;
        cout << "~~~~~~~~~~~~~~~~~~~~~" << endl;
        cout << "\n\n\n";
    }

    else if (Auswahl == 2)
    {
        cout << "Mathe-Experte 2 ist der Nachfolger von" << endl;
        cout << "Mathe-Experte. Mathe-Experte 2 ist viel ko-" << endl;
        cout << "mplexer und Spasshabiger!!" << endl;
        cout << "\n\n\n";
    }

    else if (Auswahl == 3)
    {
        cout << "Momentaner Spielername: " << Spielername << endl;
        cout << "\n" << endl;

        cout << "NAME AENDERN?" << endl;
        cout << "~~~~~~~~~~~~~" << endl;
        cout << "1) Ja, ich will" << endl;
        cout << "2) Nein, doch nicht" << endl;
        cout << "~~~~" << endl;
        cout << "Deine Wahl: ";
        cin >> Auswahl;
        cout << "\n\n\n";

        if (Auswahl == 1)
        {
            cout << "Neuer Spielername: ";
            cin >> Spielername; 
            cout << "Du heisst jetzt " << Spielername << "!" << endl;
            cout << "\n\n\n";
        }

        else if (Auswahl == 2)
        {
            cout << "Name wurde nicht geaendert!" << endl;
            cout << "\n\n\n";
        }
    }

    else if (Auswahl == 4)
    {
    }

    return 1;
}

int Sonsitges (float Auswahl, string Spielername, int &RichtigeAntworten, int &FalscheAntworten)
{
    int Zufallszahl;

    cout << "SONSTIGES" << endl;
    cout << "~~~~~~~~~" << endl;
    cout << "1) Minispiele" << endl;
    cout << "2) Kredit" << endl;
    cout << "3) Zurueck" << endl;
    cout << "~~~~" << endl;
    cout << "Deine Wahl: ";
    cin >> Auswahl;
    cout << "\n\n\n";

    if (Auswahl == 1)
    {
        cout << "MINISPIELE" << endl;
        cout << "~~~~~~~~~~" << endl;
        cout << "1) Zahlenraten" << endl;
        cout << "2) W:L:I:E?" << endl;
        cout << "3) Zurueck" << endl;
        cout << "~~~~" << endl;
        cout << "Deine Wahl: ";
        cin >> Auswahl;
        cout << "\n\n\n";

        if (Auswahl == 1)
        {
            Zufallszahl = (rand ()%100);

            while (Auswahl != Zufallszahl)
            {
                cout << "Waehle eine Zahl zwischen 0 und 100!" << endl;
                cout << "Deine Wahl: ";
                cin >> Auswahl;
                cout << "\n";

                if (Auswahl == Zufallszahl)
                {
                    cout << "Richtige Zahl!!" << endl;
                    RichtigeAntworten += 1;
                    cout << "\n\n\n";
                }

                else if (Auswahl < Zufallszahl)
                {
                    if (!cin.good ())
                    {
                        cin.clear ();
                        cin.ignore ();
                    }

                    cout << "Zahl zu klein!!" << endl;
                    FalscheAntworten += 1;
                    cout << "\n";
                }

                else if (Auswahl > Zufallszahl)
                {
                    if (!cin.good ())
                    {
                        cin.clear ();
                        cin.ignore ();
                    }

                    cout << "Zahl zu gross!!" << endl;
                    FalscheAntworten += 1;
                    cout << "\n";
                }
            }
        }

        else if (Auswahl == 2)
        {
            cout << "NOCH IN DER TESTPHASE!!" << endl;
            cout << "\n\n\n";
        }

        else if (Auswahl == 3)
        {
        }

        else
        {
            cout << "ERROR: Falsche Eingabe!" << endl;
            cout << "\n\n\n";

            if (!cin.good ())
            {
                cin.clear ();
                cin.ignore ();
            }
        }
    }

    else if (Auswahl == 2)
    {
        cout << "nicEPRO.de.tl" << endl;
        cout << "=====================================================" << endl;
        cout << "=====================================================" << endl;
        cout << "==========Programmed by Luca Spiridigliozzi==========" << endl;
        cout << "=====================================================" << endl;
        cout << "=====================================================" << endl;
        cout << "\n\n\n";
    }

    else if (Auswahl == 3)
    {
    }

    else
    {
        cout << "ERROR: Falsche Eingabe!" << endl;
        cout << "\n\n\n";

        if (!cin.good ())
        {
            cin.clear ();
            cin.ignore ();
        }
    }

    return 3;
}


C-/C++-Quelltext

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1>------ Neues Erstellen gestartet: Projekt: Mathe-Experte 2, Konfiguration: Release Win32 ------
1>Die Zwischen- und Ausgabedateien für das Projekt "Mathe-Experte 2" mit der Konfiguration "Release|Win32" werden gelöscht.
1>Kompilieren...
1>Spielen.cpp
1>Hauptmenü.cpp
1>Ressourcen werden kompiliert...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Verknüpfen...
1>Hauptmenü.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""int __cdecl Sonstiges(float,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int &,int &)" (?Sonstiges@@YAHMV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAH1@Z)".
1>Hauptmenü.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__timeGetTime@0".
1>C:\Users\Luca\Documents\Visual Studio 2008\Projects\Mathe-Experte 2\Release\Mathe-Experte 2.exe : fatal error LNK1120: 2 nicht aufgelöste externe Verweise.
1>Das Buildprotokoll wurde unter "file://c:\Users\Luca\Documents\Visual Studio 2008\Projects\Mathe-Experte 2\Mathe-Experte 2\Release\BuildLog.htm" gespeichert.
1>Mathe-Experte 2 - 3 Fehler, 0 Warnung(en)
========== Alles neu erstellen: 0 erfolgreich, Fehler bei 1, 0 übersprungen ==========

Anonymous

unregistriert

2

05.10.2008, 18:42

2 Sekunden arbeit haben diese Frage geklärt:

1/ Auf die MSDN gehen
2/ timeGetTime eingeben
3/ dieses Ergebnis bekommen:
http://msdn.microsoft.com/en-us/library/ms713418.aspx
4/ Requirements lesen und zu dem Schluss kommen: "Hey, ich benötige die Winmm.lib"


Achja und jetzt werde ich mal sehr böse: KEINE VERDAMMTEN SONDERZEICHEN (AUCH UMLAUTE) IN DATEINAMEN!!!!!

Anonymous

unregistriert

3

05.10.2008, 18:50

wwwwwwhat?

Anonymous

unregistriert

4

05.10.2008, 18:51

Wie "what"?

Anonymous

unregistriert

5

05.10.2008, 18:54

ich verstehs nicht!

Anonymous

unregistriert

6

05.10.2008, 19:02

Da steht "Requirements", was dieses Wort bedeutet kannst du in jedem Englisch/Deutsch-Wörterbuch nachlesen.

In Requirements steht "Library". Klingelts?

Anonymous

unregistriert

7

05.10.2008, 19:40

Zitat von »"unsigned long"«

Da steht "Requirements", was dieses Wort bedeutet kannst du in jedem Englisch/Deutsch-Wörterbuch nachlesen.

In Requirements steht "Library". Klingelts?


Ich habe aber kein English Deutsch Wörterbuch, weil ich hier in Luxemburg wohne und diese Dinge es hier selten gebenm. hier gibts Französisch/Deutsche-Wörterbuch

Anonymous

unregistriert

8

05.10.2008, 19:46

Also wirklich, in der Zeit von Google, Live und co. ist das doch echt nur noch eine traurige Ausrede um seine Faulheit zu supporten...

http://dict.leo.org

9

05.10.2008, 20:04

Auch ohne ein solches Buch hättest du dir das wwwwwwhat?
sparen können, wenn du unsigned long's Post genau gelesen hättest^^

Zitat von »"unsigned long"«

"Hey, ich benötige die Winmm.lib"

10

05.10.2008, 20:06

Zitat von »"Koerperkarle"«

Auch ohne ein solches Buch hättest du dir das wwwwwwhat?
sparen können, wenn du unsigned long's Post genau gelesen hättest^^

Zitat von »"unsigned long"«

"Hey, ich benötige die Winmm.lib"

Bleibt noch ein Linker-Fehler... ;)
fka tm

Werbeanzeige