Converting code from Arduino to PIC

I thought of that too but then saw the Wikipedia article for MPLAB said it does support C++ for PIC32.