My minimal and easy solution in c++
My Code

# My Code
```cpp []
class Solution {
public:
    int prefixCount(vector<string>& words, string pref) {
        int count = 0, n = pref.size();
        for(auto it: words){
            if(it.substr(0, n) == pref)
                 count++;
        }
        return count;
    }
};
```
['String Matching', 'C++']