C++ solution in string parameters
class Solution {\n    public:\n        bool isMatch(string s, string p) {\n            if(s.compare(p)) return true;\n            int ssize = (int) s.size();\n 
    class Solution {\n    public:\n        bool isMatch(string s, string p) {\n            if(s.compare(p)) return true;\n            int ssize = (int) s.size();\n            int psize = (int) p.size();\n            int i=0,j=0,pi=0,pj=psize;\n            while(i<ssize){\n                if(s[i]==p[j]||p[j]=='?'){\n                    i++;\n                    j++;\n                    continue;\n                }\n                if(p[j]=='*'){\n                    pj = j++;\n                    pi = i;\n                    continue;\n                }\n                if(pj<psize){\n                    j = pj + 1;\n                    i = ++pi;\n                    continue;\n                }\n                return false;\n            }\n           while(p[j]=='*'){\n               j++;\n           }\n           return j==psize;\n        }\n    };
[]