how to return an array in a c++ function :     int main()
    {
    
    std::string my_string= "16657";
    std::map<std::string, std::array<std::string, 2>> m_msg_int;
    std::array<std::string, 2> arrId;
    arrId[0] = "ABC";
    arrId[1] = "XYZ/CDE";
    m_msg_int[my_string] = arrId;
    get_msg_type(const std::string& msg_type);
    
     }
     
     
    const string get_msg_type(const std::string& msg_type)
    {
        TRC_ENTER(get_interface_and_msg_type, "")
        std::map<std::string, std::array<std::string, 2>>::const_iterator it = m_msg_int.find(msg_type);
        std::array<std::string, 2> intfMsg;
        if (m_msg_int.end() != it)
        {
            intfMsg = it->second;
        }
    
        return intfMsg;
    }


confused about how to return this array and extract the values.
maybe the return type is not correct.
initializing argument 1 of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>;