Hi
Ich lerne zur Zeit C++.
Ich habe mehrere Probleme.
Ich möchte eigentlich den Compiler MinGW nutzen.
Der ist ganz gut und den nutzen wir in der Schule, weil mein Lehrer da irgenwie was dran macht.
Der funzt unter Vista aber nicht.
Ich habe da schon eine Lösung, weiß aber nicht was die von mir wollen
|
Quellcode
|
1
|
1. Install MinGW to c:\MinGW2. Set Mingw env variable=c:\MinGw3. Add c:\MinGW\Bin to path(from here on is the Vista-specific fixes)4. Add C:\MinGW\lib\gcc-lib\mingw32\3.2.3 to your path5. Create an environment variable named GCC_EXEC_PREFIX and set it to c:\MinGW
|
Ich habe mir jetzt noch Visual C++ 2005 Express besorgt.
Dort habe ich nur ein Problem.
Ich möchte folgenden Text kompilieren.
|
Quellcode
|
1
|
#include<iostream>using namespace::std;main(){ float kapital=0,zinssatz=0, gkapital=0, anzahl=1; cout << "Wie gros ist ihr Kapital(ohne Euro)?"<< endl; cin >> kapital; cout << "Wie hoch ist der Zinssatz(in Prozent, aber ohne das % Zeichen)?"<< endl; cin >> zinssatz; cout << "Der Zinssatz in Dezimalzahlen lautet '" << zinssatz/100 << "'."<< endl; cout << "Wie hoch ist ihr gewuenschtes Kapital(ohne Euro)?"<< endl; cin >> gkapital; for (anzahl=0;kapital<=gkapital;anzahl++) { kapital+=kapital*zinssatz/100; cout << kapital << endl; anzahl=anzahl+1; } anzahl=anzahl-1; cout << "Sie haben nach "<< anzahl <<" Jahr(en) ihr gewuenschtes Kapital erreicht." << endl; cout << "Das neue Kapital liegt bei "<< kapital <<" Euro."<< endl;}
|
Jetzt die Frage, wie mache ich das und ist da ein Fehler drin