Witam, kiedy kompiluje program wyskakuje błąd. Proszę o pomoc
#include
#include
int main()
{
int i;
std::cout << "Podaj jakas liczbe: ";
std::cin >> i;
if(i-4)
std::cout << "zmienna i miala wartosc inna niz 4";
else
std::cout << "zmienna i miala wartosc rowna 4";
getch();
}
------ Build started: Project: test if else, Configuration: Debug Win32 ------
main.cpp
c:\users\k4mil\documents\visual studio 2010\projects\test if else\test if else\main.cpp(10): warning C4390: ';' : empty controlled statement found; is this the intent?
c:\users\k4mil\documents\visual studio 2010\projects\test if else\test if else\main.cpp(11): error C2181: illegal else without matching if
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Pozdrawiam.