Can I Conect 2 NXTs so that they work together? I am building up a robot and I want to use 2 NXT connected together because I need more than 3 ports A,B,C. So my question here is: When I write the code, is there anything different I have to do?

For example do I write the same code I would use for 2 NXT and just connect them together or do I have to do something more than this?

I found a way to connect them but I have not found examples yet of the blocks (nxt code software).
Without 3rd party hardware or software, the only way to do this is to use Bluetooth messages. For example, you could write motor power to a Bluetooth mailbox on one NXT. The other NXT just has a simple program with a loop that reads the Bluetooth mailbox and connects it to a motor block.