Zdarte. Prosím o radu. Proč mi to ukazuje chybu C4700 - uninitialized local variable 'i' used ? :)))
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int i;
int x, y, z;
cout << "napiste dve cisa ktera chcete scitat" << endl;
cin >> x;
cin >> y;
switch (i) {
case 1:
z = x + y;
cout << z << endl;
break;
case 2:
z = x * y;
cout << z << endl;
break;
break;
case 3:
z = x - y;
cout << z << endl;
case 4:
z = x / y;
cout << z << endl;
break;
break;
}
cin.get (); cin.get();
return 0;
}
uninitialized local variable 'name' used