hi i am using ms visualstudio 6.0 and i am getting error like
1. push_back' : cannot convert parameter 1 from 'char' to 'const struct struEventList &'
Reason: cannot convert from 'char' to 'const struct struEventList'
No constructor could take the source type, or constructor overload resolution was ambiguous
2. binary '=' : no operator defined which takes a right-hand operand of type 'class std::list<class CDataFrame,class std::allocator<class CDataFrame> >' (or there is no acceptable conversion)
the code would like .
void CWanNetwork ::m_fnFormEventList(char cStateType,long double ldTimer1,char cDevType,short snDevId,char cDevPortId,char cIsError)
{
//changint to implement the STL LIST
list<struEventList> pstruTemp;
list<struEventList>::iterator pstruLocal = pstruTemp.begin();
EVENTLIST* pstruLocl = NULL;
pstruTemp.push_back(cDevType);
pstruTemp.push_back(cStateType);
pstruTemp.push_back(cDevPortId);
pstruTemp.push_back(snDevId);
pstruTemp.push_back(ldTimer1);
pstruTemp.push_back(cIsError);
list<EVENTLIST> pstruHead; //2nd container for pstruHead
//if(pstruHead == NULL)
if(pstruHead.begin() == NULL)
{//1
//pstruHead = pstruTemp;
copy( pstruTemp.begin(),pstruTemp.end(),pstruHead) ; //this will copy the contents to head
}//1 if
else
{
// Assign the Head pointer to the local variable
//pstruTemp1 = pstruHead;
copy(pstruHead.begin(),pstruHead.end(),pstruTemp1) ;
list<EVENTLIST> pstruTemp1;
list<EVENTLIST>::iterator Temp1itr = pstruTemp1.begin();
while(pstruTemp1.begin()!=NULL)
{//while
//if(pstruTemp1->ldTimer1<=ldTimer1)//raj
if(Temp1itr->ldTimer1<=ldTimer1) //check with the container value
{//2
/ Store the previous pointers
/ pstruLocl = pstruTemp1;
copy(pstruTemp1.begin(),pstruTemp1.end(),pstruLocl );