There are many examples within this forum. Do some searches and read.
The WebBotLib is a good example of C library functions for robot control. Download and study the documents.
Also, it is very rare for C++ to be used in embedded processors. Straight ANSI C is the language of choice.