Simple Solution
\n\n# Code\n\nclass Solution {\npublic:\n    int countPrefixes(vector<string>& words, string s) {\n        int count =0;\n        for(auto str : words){\n      
\n\n# Code\n```\nclass Solution {\npublic:\n    int countPrefixes(vector<string>& words, string s) {\n        int count =0;\n        for(auto str : words){\n            int len = str.length();\n            auto subs = s.substr(0,len);\n            if(str == subs){\n                count++;\n            }\n        }\n        return count;\n    }\n};\n```
['C++']