    #include <iostream>
    #include <string>

    std::string addTwoStrings(const std::string& a, const std::string& b)
    {
        return a + b; // works because they are both strings.
    }

    void foo(const char* a, const char* b)
    {
        std::string str = a;
        std::cout << "1st str = [" << str << "]" << std::endl;
        str += " ";
        std::cout << "2nd str = [" << str << "]" << std::endl;
        str += b;
        std::cout << "3rd str = [" << str << "]" << std::endl;
        str = addTwoStrings(a, " ");
        std::cout << "4th str = [" << str << "]" << std::endl;
        str = addTwoStrings(str, b);
        std::cout << "5th str = [" << str << "]" << std::endl;
    }

    int main()
    {
        foo("hello", "world");
    }
