Analog read (chp09 from fantastic book) seems unreliable

Hello,
I am starting with BBB, bought Derek’s fantastic book, bot everything running, but…
As I would like to program with C++ I try to do every example from the repository.
Trying to make testADC to work is no problem: it works. But when I launch the compiled app the next time (minute, hour, day) it comes with only 1 as result. No errors. And when I try cat /sys/bus/iio/devices/iio:device0/in_voltage3_raw it shows the correct value. Even when I try the BBB example adcread.py from the main page.
So, clearly an issue with C++ , path, settings, i-dont-know…

Has this issue been treated before?
Or being solved?

Kind regards
Arthur