Download the "Both Algorithms" file. This .cpp file contains implementations for both search systems.
When you run the program, you will be asked to enter an integer, representing the length of the string to be created and used to test both searching algorithms. The range given (1000 < int < 10000000) is for optimizing the output. String lengths lower than 1000 will run, but higher numbers improve readability. String lengths higher than 10000000 will segmentation fault.
For further customization, you can change the substring to search for in the "pattern" variable.