We present a general formalism for quantum error-correcting codes that encode both classical and quantum information (the EACQ formalism). This formalism unifies the entanglement-assisted formalism and classical error correction, and includes encoding, error correction, and decoding steps such that the encoded quantum and classical information can be correctly recovered by the receiver. We formally define this kind of quantum code using both stabilizer and symplectic language, and derive the appropriate error-correcting conditions. We give several examples to demonstrate the construction of such codes.