0

So I have to build a program that shows the outcome of an imaginary battle between two groups of animals. I'm having an issue with making the user select the type of the animal. I have all my data e numerated, but I can't seem to get cin>>type to work.

#include<iostream>
using namespace std;
int main(){

    enum Animal {       //strength of each animal
        Animal_Bunny=1,
        Animal_Chicken,
        Animal_Kitty,
        Animal_Puppy,
        Animal_Wolverine=123,
    };
    struct Armies{
        Animal Type;
        int AD; 
    };

    cout << "Blood Sport Time My Friend.\n"<<"Choose your army 1=Bunny strength 1, 2=Chicken strength 2,\n"<<
            "3=Kitty strength 3, 4=Puppy strength 4, 5=Wolverine strength 123"<<endl; 
    cin >> Type.defense


}

Really any kind of hint would help a grand amount.

Edited by Gustavo_2

2
Contributors
1
Reply
19
Views
3 Years
Discussion Span
Last Post by ddanbe
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.