Menu

problem:concatenating string

Help
2008-11-27
2013-04-24
  • Awais Abbasi

    Awais Abbasi - 2008-11-27

    Hi all
    I am trying to concatenate strings but XmlRpcValue is throwing error
    this is my code for concatenation
    I dont know why its throwing error or whether XmlRpcValue  should be throwing any error

    std::string resultString  = "";
    for (int i=0; i < 50; i++)
    {
            resultString += "<Field>";
            resultString += (std::string)params[i]["Field"];
            resultString += "</Field>";
    }

    concatenation happens if I do
    resultString += "<Field>";
    resultString += "</Field>";

    but as soon as i try to concatenate
    (std::string)params[i]["Field"];
    error is thrown

    I have checked
    (std::string)params[i]["Field"]; as it does return a string

    Your help  is needed here
    Thanks

     
    • Awais Abbasi

      Awais Abbasi - 2008-11-27

      sorry error is not in XmlRpcValue
      but in

      XmlRpcServerConnection::executeRequest:fault type error.

       

Log in to post a comment.