I would agree with Richard that this really isn't a job for a beginner, or even close!
But ... start reading here:
OpenCV: cv::text::OCRTesseract Class Reference[
^] but do not expect any of this to be simple or obvious; you are unlikely to find code you can just copy'n'paste to get a working application. This is a complex subject and requires a good in depth knowledge of C++ (and OCR basics as well).