Menu

XmlRpcValue

Help
2003-02-07
2003-02-07
  • James Bengard

    James Bengard - 2003-02-07

    I have a quick question.  I don't know hardly anything about programming C++, but I have a quick question someone might be able to answer.

    void execute(XmlRpcValue& params, XmlRpcValue& result)
            {
                    XmlRpcValue& arg1 = params[0];
                    XmlRpcValue& arg2 = params[1];

    I keep getting an error about converting an int to a const char* ( thats what I need it to be )  So my question is, how do I turn the params into char* without changing the other routine?

    Thanks in advance, and I apologize if I am unclear in what I am saying.

    James

     
    • James Bengard

      James Bengard - 2003-02-07

      I figured it out, thank you anways...

       
    • Chris Morley

      Chris Morley - 2003-02-07

      The lines that you have shown shouldn't be a problem. The error about converting from an int to a const char* during compilation is probably because XmlRpcValue doesn't provide any implicit conversion to const char*. Try using a std::string instead:

      std::string& s = arg1;

      Note that statements like that do not convert the value - there really better be a string in arg1 or you will get a run time error.

      If in doubt, check the type tag.

       

Log in to post a comment.