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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
I figured it out, thank you anways...
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.