This is an example source-code for drawing a rectangle using CTurtle library. CTurtle library is forked from this sources https://github.com/walkerje/C-Turtle. The Python Turtle version documentation is listed in https://docs.python.org/3/library/turtle.html. Some functions are compatible with Python Turtle.
Compile source-code & run program
cd ./sources
c++ main.cpp -o main.o -lpthread -lX11
./main.o