Two cables with same plug type (male plug to male plug and female plug to female plug) cannot be connected directly.
A so called gender changer is used for the connection.
In the inside of the gender changer, a side switch takes place, thus the numbers of the pins on both sides stay the same as before.
It is called gender changer as a male plug becomes a female plug with the help of a gender changer and vice versa. An example connection could be a cable of a scale with male plug conected to a gender changer, and this one to PC male plug.