CA correction prototype, C/C++