title: C++ Stack: uninitialized local variables
body: <pre><code>#include "iostream"
  using namespace std;
  
  int main()
  {
  int a,d,D,c,C,b,B,r,R;
  char f,y,Y,n,N;
  
  cout &lt;&lt; "Press D - d, for dog,C -c for cat, B - b, for bird or R - r for Reptile:";
  cin &gt;&gt; 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 &lt;&lt; "Is it neutered(Y/N)";
          cin &gt;&gt; f;
          if (f == Y || f == y)
                  cout &lt;&lt; "50 Euros.";
          else if (f == n || f == N)
                  cout &lt;&lt; "80 Euros.";
  
          if (a == c || a == C )
                  cout &lt;&lt; "Is it neutered(Y/N)";
          cin &gt;&gt; f;
          if (f == Y || f == y)
                  cout &lt;&lt; "40 Euros.";
          else if (f == n || f == N)
                  cout &lt;&lt; "60 Euros.";
          if (a == r || a == R || a == B || a == b)
                  cout &lt;&lt;"10 Euros.";
  
  if (a != d &amp;&amp; a != D &amp;&amp; a != c &amp;&amp; a != C &amp;&amp; a != b &amp;&amp; a != B &amp;&amp; a != r &amp;&amp; a != R)
                  cout &lt;&lt; "Error!";
  
          system("pause");
  
  
          return 0;}
  </code></pre>
  
  <p>Error I am getting:</p>
  
  <pre><code>...\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
  </code></pre>
  
  <p>Why am I getting this Error?? I don't understand??</p>