Compiling Error:

error C2664: 'void TestFun01(std::string &)': cannot convert argument 1 from 'const char [5]' to 'std::string &'

Solution:

add const to std::string& which is a parameter of function, like this:

void TestFun01(const std::string& text)
{
    std::cout << text;
}

void TestFun02()
{
    TestFun01("abcd");
}

this would produce compiling error:

void TestFun01(std::string& text)
{
    std::cout << text;
}

void TestFun02()
{
    TestFun01("abcd");
}