Hello,
If you are working with the BSP, it has enable you don't need to write to the iomux, it works on C++ as well. As example:
root@imx7ulp:/sys/class/gpio# ls
export gpiochip128 gpiochip224 gpiochip472 gpiochip96
gpio32 gpiochip160 gpiochip32 gpiochip480 unexport
gpiochip0 gpiochip192 gpiochip464 gpiochip64
root@imx7ulp:/sys/class/gpio#
Regards