There are only 3 wires you need to connect to receive power and turn on the cd player...

Yellow Wire - Constant Power
Red Wire - Switch Power
Black - Ground

If your cd player resets everytime you turn the car off, then you do not have your constant power (yellow) hooked up correctly. That wire needs to be connect to a wire that has 100% power no matter if the vehicle is on or off. So when the vehicle is off, the constant power allows the cd player to retain all memory.