Semantically no difference, is the same constructor implemented in different ways. The two expressions have the same statement:
Jugador::Jugador(int edad, int vida);
So, the difference is in the implementation of the same constructor; the first is functionally equivalent to the second, only the second is (probably) more efficient.
The second form uses what is called "initializer list" or initialization list. The form that is preferred today is:
Jugador::Jugador(int edad, int vida) : edad{edad}, vida{vida} {}
(you will notice that braces are used instead of parentheses, which is what is called uniform initialization
).
As you see here, more than one theme is involved. I said that using a initializer list
can be more efficient, for example, although a current compiler probably generates the same instructions for both.
As a recommendation, I would tell you that the "normal", "expected", "desirable" way to write that constructor is using initializer list
along with uniform initialization
.