[Help]How to attach 2 phyisc bodies?

Hi,

Does anyone know how to attach two physic bodies together?

and can you write a code example please?

Thanks.

I think that you need to use Joints. Here are visual examples

http://www.cocos2d-x.org/wiki/Physics#ContactsJoints