Under no circumstances will late assignments be accepted.
The code you submit must conform with the programming guidelines.
int find(string s, string t)
that employs a recursive algorithm to test whether the string t is contained in the string s. If so, it returns the offset of the first match. If not, it returns -1. For example,
find("Mississippi", "is") returns 1.
find("Mississippi", "Miss") returns 0.
find("Mississippi", "pi") returns 9.
find("Mississippi", "hip") returns -1.
Hint: If t is longer than s, you can return -1 with confidence. Otherwise, compare t and the initial substring of s with t.length() characters. If those are the same strings, then return 0. Otherwise call the function recursively with the tail of s (that is, s without the first character).
Note: Only submit the function int find(string s, string t) in find.cpp. Do not submit a program main().
Note:: You cannot add input arguments, change types, or otherwise make changes to the function interface as defined in the prototype: int find(string s, string t);.
main.cpp
print_find.cpp
funcs.h
Makefile
Here is a wrapper function.
Modify this wrapper, filling in the missing pieces needed to complete the assignment.
You are responsible for thoroughly testing your program to make sure that it works. In grading your program, we will test your program on some standard tests.