How to control GPIO through C++ source code ?

I want to call SystemIO to let GPIO output a electric signal. How can I do it with C++ source code?

Thanks for help!

OK.Thanks for viewing. I’ve found the solution myself.
FYI :
[b]Writing a Linux Kernel Module — Part 1: Introduction | derekmolloy.ie

Hi, do you have a sample for controlling GPIO through C++ code?

Here is an illustration of how to do it with mmap().
Note that it depends on where the device tree puts your GPIO devices, so I’m not 100% sure if the values used are correct for your use case.
Try it out and see if it works?

thanks, snarky, I have also coded a sample for jetson xavier at