Coding a small leveling system

Hello, I am making a small textRPG and I would like to know how to make a leveling system and gain new attacks and moves that can lower defense, and if there is anything I can do better please tell me.
Thanks!

#include <iostream>
using namespace std;

void asciiArt()
{
cout << "____________" << endl;
cout << "| |" << endl;
cout << "| | | |" << endl;
cout << "| | |" << endl;
cout << "| |" << endl;
cout << "============" << endl;
cout << "============" << endl;
}
enum mounts
{
Horse,
Chocobo,
Goat
};
char attack = 'a';
int attackDamage = 10;
char yes = 'y';
char no = 'n';
char answer;
class userCharacter {
public:
int hp;
string name;
int def;
int exp;
int level;
};
class enemy {
public:
int hpE;
string classType;
int defE;
};

void textRpg()
{
userCharacter me;
me.hp = 100;
me.name = "Billy";
userCharacter* ptrMe;
ptrMe = &me;
enemy com;
com.hpE = 100;
com.classType = "Ninja";
cout << "The enemy is a " + com.classType << endl;
while (com.hpE >= 0) {
cout << "Attack? (press a to attack)" << endl;
cin >> attack;
com.hpE -= attackDamage;
me.hp -= attackDamage;
cout << "Enemy HP: " << com.hpE << endl;
cout << "Your HP" << me.hp << endl;
sleep(10);
}
cout << "The Ninja is dead. You continue your adventure" << endl;
sleep(4);
cout << "You have travelled on a road for 5 miles, when a corrupt and evil samurai attacks you." << endl;
com.classType = "Samurai";
com.hpE = 150;
com.defE = 2;
while (com.hpE >= 0) {
cout << "Attack?" << endl;
cin >> attack;
attackDamage = attackDamage -= com.defE;
com.hpE -= attackDamage;
me.hp -= attackDamage;
cout << "Enemy HP: " << com.hpE << endl;
cout << "Your HP" << me.hp << endl;
sleep(10);
}

}
char answerMount;


int main()
{
cout << "Hello, I am a kid learning to program in C++ and Ruby." << endl;
cout << "Would you like to see some ASCII art of a sock monkey, it isn't that good. Enter y for yes, n for no." << endl;
cin >> answer;
if (answer == yes)
{
asciiArt();
}
else
{
cout << "Shame." << endl;
}
sleep(5);
cout << "Hey, which would rather ride, a horse or a chocobo or a goat?" << endl;
sleep(1);
cout << "LOL I am not going to let you decide!" << endl;
switch ( mounts() )
{
case Goat:
cout << "It bucks you off!" << endl;
break;
case Chocobo:
cout << "I found you Final Fantasy fan." << endl;
break;
default:
cout << "So you are going with a horse, good choice." << endl;
break;
};
sleep(5);
cout << "You are now about to play a small one enemy text RPG." << endl;
textRpg();
cout << "That is the end of this program, thanks." << endl;
return 0;
};
Topic archived. No new replies allowed.