K
kamaraj80
Hi
I am using the std:: map as following.
typedef struct _SeatRowCols
{
long nSeatRow;
unsigned char ucSeatLetter;
}SeatRowCols;
typedef struct _NetData
{
SeatRowCols tSeatRowCols;
unsigned char ucMacAddress[MAC_LENGTH];
unsigned char ucAdminStatus;
unsigned char ucLocalFault;
}NetData;
typedef std::map <SeatRowCols, PedData> MAP_PED_DATA;
..........
.............
MAP_PED_DATA data;
PedData pdata;
SeatRowCols sdata;
memset((void*)&sdata,0,sizeof(SeatRowCols));
sdata.nSeatRow =1;
sdata.ucSeatLetter ='A';
memset((void*)&pdata,0,sizeof(PedData));
pdata.nPortClass = 1;
pdata.tSeatRowCols = sdata;
data[sdata] = pdata;
while compiling this code the following error are occurs.
Compiling...
DemoOfDatatStructures.cpp
E:\testprjs\testit\DemoOfDatatStructures\DemoOfDatatStructures.cpp(79)
: warning C4786:
'std::reverse_bidirectional_iterator<std::_Tree<_SeatRowCols,std:air<_SeatRowCols
const
E:\testprjs\testit\DemoOfDatatStructures\DemoOfDatatStructures.cpp(79)
: warning C4786:
'std::reverse_bidirectional_iterator<std::_Tree<_SeatRowCols,std:air<_SeatRowCols
const
E:\testprjs\testit\DemoOfDatatStructures\DemoOfDatatStructures.cpp(79)
: warning C4786:
'std:air<std::_Tree<_SeatRowCols,std:air<_SeatRowCols const
characters in the debug information
E:\testprjs\testit\DemoOfDatatStructures\DemoOfDatatStructures.cpp(79)
: warning C4786:
'std:air<std::_Tree<_SeatRowCols,std:air<_SeatRowCols const
'255' characters in the debug information
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2784: 'bool __cdecl std:perator <(const class
std::multimap<_K,_Ty,_Pr,_A> &,const class std::multimap<_K,_Ty,_Pr,_A>
&)' : could not deduce template argument for 'const
class std::multimap<_K,_Ty,_Pr,_A> &' from 'const struct _SeatRowCols'
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2784: 'bool __cdecl std:perator <(const class
std::map<_K,_Ty,_Pr,_A> &,const class std::map<_K,_Ty,_Pr,_A> &)' :
could not deduce template argument for 'const class std
::map<_K,_Ty,_Pr,_A> &' from 'const struct _SeatRowCols'
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2784: 'bool __cdecl std:perator <(const class
std::_Tree<_K,_Ty,_Kfn,_Pr,_A> &,const class
std::_Tree<_K,_Ty,_Kfn,_Pr,_A> &)' : could not deduce template argument
for 'c
onst class std::_Tree<_K,_Ty,_Kfn,_Pr,_A> &' from 'const struct
_SeatRowCols'
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2784: 'bool __cdecl std:perator <(const class
std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &,const class
std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &)' : could not deduce te
mplate argument for 'const class
std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &' from 'const struct
_SeatRowCols'
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2784: 'bool __cdecl std:perator <(const struct
std:air<_T1,_T2> &,const struct std:air<_T1,_T2> &)' : could not
deduce template argument for 'const struct std:air<
_T1,_T2> &' from 'const struct _SeatRowCols'
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2784: 'bool __cdecl operator <(_Interface *,class
_com_ptr_t<_InterfacePtr> &)' : could not deduce template argument for
' *' from 'const struct _SeatRowCols'
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2784: 'bool __cdecl operator <(int,class _com_ptr_t<_Interface>
&)' : could not deduce template argument for 'overloaded function type'
from 'overloaded function type'
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2676: binary '<' : 'const struct _SeatRowCols' does not define
this operator or a conversion to a type acceptable to the predefined
operator
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
Error executing cl.exe.
Please gimme some suggestions.
Regards
kamaraj.M
I am using the std:: map as following.
typedef struct _SeatRowCols
{
long nSeatRow;
unsigned char ucSeatLetter;
}SeatRowCols;
typedef struct _NetData
{
SeatRowCols tSeatRowCols;
unsigned char ucMacAddress[MAC_LENGTH];
unsigned char ucAdminStatus;
unsigned char ucLocalFault;
}NetData;
typedef std::map <SeatRowCols, PedData> MAP_PED_DATA;
..........
.............
MAP_PED_DATA data;
PedData pdata;
SeatRowCols sdata;
memset((void*)&sdata,0,sizeof(SeatRowCols));
sdata.nSeatRow =1;
sdata.ucSeatLetter ='A';
memset((void*)&pdata,0,sizeof(PedData));
pdata.nPortClass = 1;
pdata.tSeatRowCols = sdata;
data[sdata] = pdata;
while compiling this code the following error are occurs.
Compiling...
DemoOfDatatStructures.cpp
E:\testprjs\testit\DemoOfDatatStructures\DemoOfDatatStructures.cpp(79)
: warning C4786:
'std::reverse_bidirectional_iterator<std::_Tree<_SeatRowCols,std:air<_SeatRowCols
const
'255' characters in the debug information::_Kfn,std::less<_SeatRowCols>,std::allocator<_PedData> >::iterator,std:air<_SeatRowCols const ,_PedData>,std:air<_SeatRowCols const ,_PedData> &,std:air<_SeatRowCols const ,_PedData> *,int>' : identifier was truncated to
E:\testprjs\testit\DemoOfDatatStructures\DemoOfDatatStructures.cpp(79)
: warning C4786:
'std::reverse_bidirectional_iterator<std::_Tree<_SeatRowCols,std:air<_SeatRowCols
const
was truncated to '255' characters in the debug information::_Kfn,std::less<_SeatRowCols>,std::allocator<_PedData> >::const_iterator,std:air<_SeatRowCols const ,_PedData>,std:air<_SeatRowCols const ,_PedData> const &,std:air<_SeatRowCols const ,_PedData> const *,int>' : identifier
E:\testprjs\testit\DemoOfDatatStructures\DemoOfDatatStructures.cpp(79)
: warning C4786:
'std:air<std::_Tree<_SeatRowCols,std:air<_SeatRowCols const
::_Kf
ator<_PedData> >::iterator>' : identifier was truncated to '255'::iterator,std::_Tree<_SeatRowCols,std:air<_SeatRowCols const ,_PedData>,std::map<_SeatRowCols,_PedData,std::less<_SeatRowCols>,std::allocator<_PedData> >::_Kfn,std::less<_SeatRowCols>,std::alloc
characters in the debug information
E:\testprjs\testit\DemoOfDatatStructures\DemoOfDatatStructures.cpp(79)
: warning C4786:
'std:air<std::_Tree<_SeatRowCols,std:air<_SeatRowCols const
::_Kf
:allocator<_PedData> >::const_iterator>' : identifier was truncated to::const_iterator,std::_Tree<_SeatRowCols,std:air<_SeatRowCols const ,_PedData>,std::map<_SeatRowCols,_PedData,std::less<_SeatRowCols>,std::allocator<_PedData> >::_Kfn,std::less<_SeatRowCols>,std:
'255' characters in the debug information
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2784: 'bool __cdecl std:perator <(const class
std::multimap<_K,_Ty,_Pr,_A> &,const class std::multimap<_K,_Ty,_Pr,_A>
&)' : could not deduce template argument for 'const
class std::multimap<_K,_Ty,_Pr,_A> &' from 'const struct _SeatRowCols'
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2784: 'bool __cdecl std:perator <(const class
std::map<_K,_Ty,_Pr,_A> &,const class std::map<_K,_Ty,_Pr,_A> &)' :
could not deduce template argument for 'const class std
::map<_K,_Ty,_Pr,_A> &' from 'const struct _SeatRowCols'
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2784: 'bool __cdecl std:perator <(const class
std::_Tree<_K,_Ty,_Kfn,_Pr,_A> &,const class
std::_Tree<_K,_Ty,_Kfn,_Pr,_A> &)' : could not deduce template argument
for 'c
onst class std::_Tree<_K,_Ty,_Kfn,_Pr,_A> &' from 'const struct
_SeatRowCols'
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2784: 'bool __cdecl std:perator <(const class
std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &,const class
std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &)' : could not deduce te
mplate argument for 'const class
std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &' from 'const struct
_SeatRowCols'
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2784: 'bool __cdecl std:perator <(const struct
std:air<_T1,_T2> &,const struct std:air<_T1,_T2> &)' : could not
deduce template argument for 'const struct std:air<
_T1,_T2> &' from 'const struct _SeatRowCols'
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2784: 'bool __cdecl operator <(_Interface *,class
_com_ptr_t<_InterfacePtr> &)' : could not deduce template argument for
' *' from 'const struct _SeatRowCols'
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2784: 'bool __cdecl operator <(int,class _com_ptr_t<_Interface>
&)' : could not deduce template argument for 'overloaded function type'
from 'overloaded function type'
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
e:\program files\microsoft visual studio\vc98\include\functional(86) :
error C2676: binary '<' : 'const struct _SeatRowCols' does not define
this operator or a conversion to a type acceptable to the predefined
operator
e:\program files\microsoft visual
studio\vc98\include\functional(86) : while compiling class-template
member function 'bool __thiscall std::less<struct
_SeatRowCols>:perator ()(const struct _SeatRowCols &,const struct
_SeatRowCols &) const
'
Error executing cl.exe.
Please gimme some suggestions.
Regards
kamaraj.M