Brainflow is a Cpp library which provides low-level API to read data from OpenBCI, this API used by different bindings and for Cpp there is a high level API as well
You can find usage example at cpp-test
You need to compile and install brainflow to use it