Ok, I am a bit confused. How do I make a derived class from this:

Code:
#include <iostream>

class Enemy
{
	public:	

	int enemyHealth;
	
	int attack();
	
};

int Enemy::attack()
{
	int hit;

	
	srand(time(NULL));
	hit = rand() % 6 + 5;
	return hit;
}
I think it is something like:
Code:
class Joker  : public Enemy
{
// I know that everything thats public in Enemy is in Joker automatically.
};
Also, how do i change the method, or do I have to write a new one for this class?