The cheque has to be lodged to the account if its crossed and only into the account that the cheque is paying into. The bank will not cash the cheque if you are not the person to whom the cheque is made out to nor would they lodge it to your account.
To answer langers question, you sign a waiver form and endorse the cheque over. The form makes it legally binding for them to encash the cheque, even though it's crossed 'a/c payee only'. However, the other answers are still valid, too.