Pokazuje mi błąd w linijce z getchar(); , a dokładnie, że "getchar" nie było zadeklarowane. Jaki błąd popełniłam, że mi to pokazuje?
#include <iostream>
#include <windows.h>
#include <cstdlib>
using namespace std;
float y, x;
int wybor;
int main()
{
for( ; ; )
{
cout << "Podaj liczbe 1" << endl;
cin >> y;
cout << endl << "Podaj liczbe 2" << endl;
cin >> x;
cout << "Menu glowne" << endl << endl;
cout << "1. Dodawanie" << endl;
cout << "2. Odejmowanie" << endl;
cout << "3. Mnozenie" << endl;
cout << "4. Dzielenie" << endl;
cout << "5. Koniec" << endl;
cout << "Wybierz: ";
cin >> wybor;
switch(wybor)
{
case 1:
{
cout << "Suma: " << y+x;
}
break;
case 2:
{
cout << "Roznica: " << y-x;
}
break;
case 3:
{
cout << "Iloczyn: " << y*x;
}
break;
case 4:
{
if(x==0)
{
cout << "Nie dzielimy przez zero!!";
}
else
{
cout << "Iloraz: " << y/x;
}
}
break;
case 5:
{
exit(0);
}
break;
default:
cout << "Bledna opcja";
}
getchar();
system("cls");
}
return 0;
}