C++ code for the POS system