title: Redefinition Error C++
body: <p>I am having trouble with the portion where I need to print the day. I tried making a second variable but it is not working. Basically I take a user input for their birthday. Then I'm trying to call this function that determines the day of birth (it determines a number that represents a day). Then I am trying to send this number to the function that takes the number and prints the birthday day in words. I am now getting the error that 'int day2' redefinition.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>void determineDayOfBirth() {
  
      int day;
      int month;
      int year;
      char backslash;
      char backslash2;
  
      cout &lt;&lt; "Enter your date of birth" &lt;&lt; endl;
      cout &lt;&lt; "format: month / day / year --&gt;" &lt;&lt; endl;
      cin &gt;&gt; month &gt;&gt; backslash &gt;&gt; day &gt;&gt; backslash2 &gt;&gt; year;
  
      if (isValidDate(month, day, year)) {
          int day2;
          cout &lt;&lt; "You were born on a: ";
          int day2 = determineDay(month, day, year);
          printDayOfBirth(day2); 
          cout &lt;&lt; endl;
          cout &lt;&lt; "Have a great birthday!!!";
      }
      else {
          cout &lt;&lt; "Invalid date";
      }
      return;
  }
  </code></pre>