I'm pretty new to coding, and I'm following this French tutorial that is basically making a RPG game used through console.

So I got a Character class in a `.cpp` file and `.h`, another `.h` `.cpp` couple of files for the weapons, and my main.

I got a function on my CPP file that's like this :

```
void Character::attack(Character &target)
{
    target.takeDamage(m_weapon.getDamage());

}

```

So far, in understand I'll use it in this way : `davids.attack(goliath)` and I made an alias so I can easily use the `takeDamage` function of my target using its alias.

but I'd like to add a console line like `David attacked Goliath and made X damages` in that function.
And it looks like I can't call another function like

```
string Character::getname 
{return name}

```

due to the fact I use 2 different characters.

Is there a way to get around that or should I get them both an alias?