KMP Algorithm for String Search Implemented in C++