Hallo Leute,
Ich fange jetzt an in der Freizeit etwas C++ zu Programmieren.
Ich habe mir jetzt Anjuta heruntergeladen, und schon ein kleines Hallo Welt Programm geschrieben, aber beim Ersten #include fängt es an:
#include <iostream> #include <time.h> int main() { int zahl; int ratezahl; srand(time); ratezahl = rand()%100+1; std::cout << "Ratespiel\n\n"; while (zahl != ratezahl) { std::cout << "Gib eine Zahl zwischen 1 und 100 ein: "; std::cin >> zahl; if (zahl == ratezahl) std::cout << "Richtig geraten.\n\n"; else if (zahl > ratezahl) std::cout << "Deine Zahl ist zu gross\n\n"; else if (zahl < ratezahl) std::cout << "Deine Zahl ist zu klein\n\n"; } return 0; }
Der Compiler findet time.h nicht. Ich habe aber /usr/include/ in den Compiler Suchpfad aufgenommen.
Was stimmt da nicht?