I have a project for class and I have an error coming up that I don't understand. I've written code the same way I always do, and haven't found that I've done something oddly, but I still get an uninitialized local variable warning.
Here is my code:
include <iostream>
include <iomanip>
include <cmath>
include <cstdlib>
include <ctime>
using namespace std;
int main()
{
//Define variables
int userGuess, EuserGuess, wager;
int Black, black, Red, red, odd, even;
int Exact, exact;
// Welcome user and display odds
cout << "Here are your odds:\n\n";
cout << " 1 to 1 | Black (Odd Numbers)\n";
cout << " 1 to 1 | Red (Even Numbers)\n";
cout << "35 to 1 | Exact Guess..n" << endl;
//Ask for user input
cout << "How would you like to place your bet?\n";
cout << "Black, Red, or Exact: ";
cin >> userGuess;
if (userGuess == Black || black)
userGuess = odd;
if (userGuess == Red || red)
userGuess = even;
if (userGuess == Exact || exact)
{
cout << "What number would you like you place your bet(1-36)?";
cin >> EuserGuess;
}
cout << "How much would you like to wager?\n";
cout << "$ ";
cin >> wager;
cout << "\n\n\nYou have chosen to wager " << wager << " on " << userGuess << endl << endl;
return 0;
}
It's unfinished, but I don't think that matters much.
Any ideas?
Thanks for any help in advance.