How to adapt tutorial for C++ development?

Hi, I am new to embedded ARM development. I have read the 'Building your first embedded image' tutorial here:

https://developer.arm.com/documentation/102432/latest/

I want to write in C++. In the tutorial example, can I simply replace main.c with main.cpp or are other steps/changes necessary?

I want to target a Cortex M4 processor eventually.

Best regards

David