Implement strStr().
Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
class Solution { public: int strStr(char *haystack, char *needle) { if(!*needle) return 0; char *p1=haystack; char *p2; char *p1_advance=haystack;//此值用于保证haystack的剩余长度大于needle char *p1_old=haystack; p2=needle+1;//注意此处的初始值 while(*p2!='