hi
am getting error when am trying to type cast.is it possible to type
cast from one type of vector to another type.is there any other way
other than overloading.my peice of code in which am getting error is.
Here is my peice of code.
_______________ ______
vector<Varbind> varbinds;
vector<NameValu ePair> nameValuePairs;
if(varbinds.siz e()!=0) {
for(int index = 0;index<varbind s.size();++inde x) {
nameValuePairs. push_back(varbi nds[index]);
}
}
here i have to cast the type of varbinds from type vector<Varbinds > to
the type vector<NameValu ePair>
And the second query is
_______________ _______
it is also with push_back.Here is the peice of code
vector<NameValu ePair> ar = req.arr();
VarbindList varbinds;
for ( int i = 0; i < ar.size(); ++i ) {
varbinds.push_b ack(ar); //Error Here
}
Here varbinds is the object of the class VarbindList and ar is of
type vector<NameValu ePair>.I have to cast vector<NameValu ePairs> to the
type VarbindList.
Please help me in this to aspects ASAP.
--
Posted via http://dbforums.com
Comment