Im looking to creat a small program to display 3 characters Zombie,Mage,Warrior,show there type,health and weapon,this is what i have so far as a test for the first one:
#include <iostream>
usingnamespace std;
struct characterone
{
char type;
int heal
char weapon;
};
int main()
{
characterone zombie;
zombie.type = 'zombie';
zombie.health = 100;
zombie.weapon = 'melee';
cout<<"Character One is a: " << zombie.type << "\n";
cout<<"Character One health is " << zombie.health << "\n";
cout<<"Character Ones weapon is " << zombie.weapon << "\n";
cin.get();
cin.get();
return 0;
}
when i run this the name and weapon only show the letter 'e',not sure why?
I also need to be able to have the option of inputing a new health. If you can imagine this as being a Menu style,then you pick your character
I cant seem to get this to work,im trying to output the health but leave the option for it to be alterd up or down by a user input then re display again