using namespace std;
int main(void)
{
// declaring an array to store name/value pair
struct Property user_property[2];
xmlrB2BMQClass xmlrMQresponse;
xmlrMQresponse.SetMQStateCode("Ajit");
xmlrMQresponse.SetMQErrorCode("Gunge");
const char* const list1[] = {"stateCode","errorCode"};
user_property[0].value=(const char*)GetMQStateCode();
//const char* const list2[] = {xmlrMQresponse.GetMQStateCode(),xmlrB2BMQClass.GetMQStateCode()};
const size_t len = sizeof(list1) / sizeof(list1[0]);
for (size_t i = 0; i <len; i++) {
strcpy(user_property[i].name,list1[i]);
// strcpy(user_property[i].value,list2[i]);
}
for (size_t i = 0; i <len; i++) {
cout <<user_property[i].name<<endl;
cout <<user_property[i].value<<endl;
}
return 0;
}
The compile error is at line 18 GetMQStateCode not declared in this scope.What is that I am doing wrong here.
yeah.That was an error but the actual problem is something different.I have a getfunction that returns a string I want to store the values of these get fucnitons in character arrays.Is there a way that I can do this.If yes can someone tell me how?