strlen って思う存分 string.h を必要とするやんかー。

char *mystrstr(const char *str, const char *search)
{
    const char *p1, *p2;
    while (1)
    {
        p1 = str;
        p2 = search;
        while (*p2 && (*p1 == *p2))
        {
            ++p1;
            ++p2;
        }
        if (! *p2)
            return (char *)str;
        if (! *p1)
            return NULL;

        ++str;
    }
    return NULL; /* tricking compiler */
}

私ならこう書くっす。
(char *) ってキャストしてるけど,C++ なら const_cast 使うべきっすね。