Driver program for above function .
int main ( ) { string s = " codecppforfood " ; string begin = " c " ; string end = " d " ; cout << numberOfDifferentSubstrings ( s , begin , end ) << endl ; return 0 ; }