C++类重载运算符后做形参怎么解决

问题遇到的现象和发生背景 C++类重载运算符后做形参
问题相关代码,请勿粘贴截图
#include <iostream>
#include <string>
#include <vector>
using namespace std;
void Print(int n)
{
    cout << n * n << ",";
}
class MyPrint
{
public:
    void operator()(const string& s)
    {
        cout << s << ",";
    }
};
void my_for_each(int i[], int* end, void (*p)(int))
{
    int* q;
    q = &i[0];
    while (q != end)
    {
        p(*q);
        q++;
    }
}
void my_for_each(string& str1, string& str2, )
{
    string* str;
    str = &str1;
    while (str != &str2)
    {
        str++;
        MyPrint(*str);
    }
}
int main()
{
    int t;
    int a[5];
    vector<string> vt;
    cin >> t;
    while (t--)
    {
        vt.clear();
        for (int i = 0;i < 5; ++i)
            cin >> a[i];
        for (int i = 0;i < 5; ++i)
        {
            string s;
            cin >> s;
            vt.push_back(s);
        }
        my_for_each(a, a + 5, Print);
        cout << endl;
        my_for_each(vt.begin(), vt.end(), MyPrint());
        cout << endl;
    }
    return 0;
}

运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果 想知道第二个my_for_each函数该怎么写

提示,调用函数,参数必须匹配,vector::iterator 不是string