Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6334609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:41:33+00:00 2026-05-24T18:41:33+00:00

I need to have a nested pass by reference. EDITED TO INCLUDE ACTUAL CODE

  • 0

I need to have a nested pass by reference.

EDITED TO INCLUDE ACTUAL CODE

Exact error is:

no matching function for call to ‘CLItem::getValue(std::string*&)’

Complete error is:

App/CycCmdLine.cpp: In member function ‘std::string CycCmdLine::getEnvironment()’:
App/CycCmdLine.cpp:245: error: no matching function for call to ‘CycCmdLine::getValue(const char [16], std::string&)’
./../CmdLine/CmdLine.h: In member function ‘bool CmdLine::getValue(std::string, T&) [with T = std::string*]’:
App/CycCmdLine.cpp:384:   instantiated from here
./../CmdLine/CmdLine.h:237: error: no matching function for call to ‘CLItem::getValue(std::string*&)’
./../CmdLine/CmdLine.h:145: note: candidates are: bool CLItem::getValue(bool&)
./../CmdLine/CmdLine.h:146: note:                 bool CLItem::getValue(std::string&)
./../CmdLine/CmdLine.h:147: note:                 bool CLItem::getValue(long unsigned int&)
./../CmdLine/CmdLine.h:148: note:                 bool CLItem::getValue(std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)
./../CmdLine/CmdLine.h:149: note:                 bool CLItem::getValue(std::list<std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::list<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >&)

Updated code:

// initial caller
string CycCmdLine::getEnvironment()
{
    string sRet="";
    do
    {     
        if(hasLogFile())
            {
                string sLogFile="";
                getValue(CYCCMD_CMDSTR_LOGFILE, sLogFile);
                sRet+="\n  -Profiler logfile: "+sLogFile;
            }
    }while(false);
    return(sRet);
}

// CmdLine::getValue function definition (this is in the header file, as a template should be)
template <typename T>
bool CmdLine::getValue(string sName, T &tValue)
{
    bool bRet=false;
    do
    {
    // try to get the iterator
    bool bExists;
    map<string, CLItem*>::iterator itItr;
    bExists=getMapElement(sName, itItr);

        // go ahead and return the value
        if(!itItr->second->getValue(tValue)) { break; }
        bRet=true;
    }while(false);
    return(bRet);
}

bool CLItem::getValue(string& sValue)
{
    bool bRet=false;
    do
    {
        // is this the correct type?
        if(!isType(CLType_STRING)) { break; }

        // return the value
        sValue=m_sValue;
        bRet=true;
    }while(false);
    return(bRet);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:41:34+00:00Added an answer on May 24, 2026 at 6:41 pm

    If we look into this part of the message

    ./../CmdLine/CmdLine.h: In member function ‘bool CmdLine::getValue(std::string, T&) [with T = std::string*]’:
    App/CycCmdLine.cpp:384:   instantiated from here
    ./../CmdLine/CmdLine.h:237: error: no matching function for call to ‘CLItem::getValue(std::string*&)’
    

    It seems to say that atApp/CycCmdLine.cpp:384 you call getValue with T being a std::string*. This then causes the template to try to call a function that doesn’t exist.

    Start investigating this line 384!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have code with nested objects like this do I need to use
I have need for a function pointer that takes two arguments and returns a
I have nested xsl:for loops: <xsl:for-each select=/Root/A> <xsl:for-each select=/Root/B> <!-- Code --> </xsl:for> </xsl:for>
I have a table structure as follows. Now I need to sort these nested
please I need your help with a Linq expression: I have nested objects with
I have a GUI with nested panels(tabbed with nested panels and etc). I need
We have need for a rating system in a project we are working on,
I have need to select a number of 'master' rows from a table, also
I have the following need I have a logging table which logs som leads
I have need to produce LINE, BAR, and PIE charts in Rails. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.