#include "iostream"
using namespace std;
int main()
{
int a,d,D,c,C,b,B,r,R;
char f,y,Y,n,N;
cout << "Press D - d, for dog,C -c for cat, B - b, for bird or R - r for Reptile:";
cin >> a;
if (a == d || a == D || a == c || a == C || a == b || a == B || a == r || a == R);
if (a == d || a == D || a == c || a == C)
if (a == d || a == D )
cout << "Is it neutered(Y/N)";
cin >> f;
if (f == Y || f == y)
cout << "50 Euros.";
else if (f == n || f == N)
cout << "80 Euros.";
if (a == c || a == C )
cout << "Is it neutered(Y/N)";
cin >> f;
if (f == Y || f == y)
cout << "40 Euros.";
else if (f == n || f == N)
cout << "60 Euros.";
if (a == r || a == R || a == B || a == b)
cout <<"10 Euros.";
if (a != d && a != D && a != c && a != C && a != b && a != B && a != r && a != R)
cout << "Error!";
system("pause");
return 0;}
私が得ているエラー:
...\12b.cpp(21): warning C4390: ';' : empty controlled statement found; is this the intent?
...\12b.cpp(20): error C4700: uninitialized local variable 'd' used
...\12b.cpp(20): error C4700: uninitialized local variable 'D' used
...\12b.cpp(20): error C4700: uninitialized local variable 'c' used
...\12b.cpp(20): error C4700: uninitialized local variable 'C' used
...\12b.cpp(20): error C4700: uninitialized local variable 'b' used
...\12b.cpp(20): error C4700: uninitialized local variable 'B' used
...\12b.cpp(20): error C4700: uninitialized local variable 'r' used
...\12b.cpp(20): error C4700: uninitialized local variable 'R' used
...\12b.cpp(25): error C4700: uninitialized local variable 'Y' used
...\12b.cpp(25): error C4700: uninitialized local variable 'y' used
...\12b.cpp(27): error C4700: uninitialized local variable 'n' used
...\12b.cpp(27): error C4700: uninitialized local variable 'N' used
なぜこのエラーが発生するのですか?? 理解できない??