  Two cochain complexes are constructed for an algebra A and a coalgebra C
entwined with each other via the map $\psi:C\otimes A\to A\otimes C$. One
complex is associated to an A-bimodule, the other to a C-bicomodule. In the
former case the resulting complex can be considered as a $\psi$-twisted
Hochschild complex of A, while for the latter one obtains a $\psi$-twist of the
Cartier complex of C. The notion of a {\em weak comp algebra} is introduced by
weakening the axioms of the Gerstenhaber comp algebra. It is shown that such a
weak comp algebra is a cochain complex with two cup products that descend to
the cohomology. It is also shown that the complexes associated to an entwining
structure and A or C are examples of a weak comp algebra. Finally both
complexes are combined in a double complex whose role in the deformation theory
of entwining structures is outlined.
