Click here to Skip to main content
15,881,089 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Question about return value of STD MAP::INSERT Pin
Mircea Neacsu18-Dec-22 8:14
Mircea Neacsu18-Dec-22 8:14 
GeneralRe: Question about return value of STD MAP::INSERT Pin
ForNow18-Dec-22 8:31
ForNow18-Dec-22 8:31 
Questionhow to typedef array of 4 char to be used in map template Pin
ForNow13-Dec-22 14:17
ForNow13-Dec-22 14:17 
AnswerRe: how to typedef array of 4 char to be used in map template Pin
CPallini13-Dec-22 21:05
mveCPallini13-Dec-22 21:05 
GeneralRe: how to typedef array of 4 char to be used in map template Pin
ForNow14-Dec-22 1:47
ForNow14-Dec-22 1:47 
GeneralRe: how to typedef array of 4 char to be used in map template Pin
CPallini14-Dec-22 2:17
mveCPallini14-Dec-22 2:17 
GeneralRe: how to typedef array of 4 char to be used in map template Pin
ForNow14-Dec-22 2:30
ForNow14-Dec-22 2:30 
GeneralRe: how to typedef array of 4 char to be used in map template still getting compile errors Pin
ForNow15-Dec-22 2:24
ForNow15-Dec-22 2:24 
Hi

I inserted the definitions you provided however I am still getting compile errors
C++
struct ESDID
{
	char c[4];
 uint32_t operator()() { return ((c[0] << 24) | (c[1] << 16) | (c[2] << 8) | c[3]); };
};



C++
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xstddef(127,22): error C2676: binary '<': 'const _Ty' does not define this operator or a conversion to a type acceptable to the predefined operator
1>        with
1>        [
1>            _Ty=ESDID
1>        ]
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xstddef(126): message : while compiling class template member function 'bool std::less<ESDID>::operator ()(const _Ty &,const _Ty &) const'
1>        with
1>        [
1>            _Ty=ESDID
1>        ]
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xutility(1518): message : see reference to function template instantiation 'bool std::less<ESDID>::operator ()(const _Ty &,const _Ty &) const' being compiled
1>        with
1>        [
1>            _Ty=ESDID
1>        ]
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xmemory(1380): message : see reference to class template instantiation 'std::less<ESDID>' being compiled
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xmemory(1380): message : see reference to variable template 'const bool is_empty_v<std::less<ESDID> >' being compiled
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\map(75): message : see reference to class template instantiation 'std::_Tree<std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,false>>' being compiled
1>        with
1>        [
1>            _Kty=ESDID,
1>            _Ty=extsymbol,
1>            _Pr=std::less<ESDID>,
1>            _Alloc=std::allocator<std::pair<const ESDID,extsymbol>>
1>        ]


here is my definition of type extsymbol not quite sure where the error is from


C++
struct extsymbol
{

	unsigned char recordtype;
	unsigned char recordtypeflag;
	BYTE reserved1[4];
	ESDID SYMESDID;
	BYTE reserved2[4];
	BYTE align[4];
	BYTE seclen[4];
	ESDID sumower;
	BYTE reserved3[8];
	BYTE nmeoffset[4];
	BYTE nmelen[4];
	BYTE aliasoffset[4];
	BYTE alisnmelen;
	char symname[63];
};


Here is the code the references extsymbol

C++
case 0x0020:
	{
		extsymbol* exsympointer = (extsymbol*)procpointer->buffer;

		procpointer->extsymcollector.insert({ exsympointer->SYMESDID, *exsympointer });


		procpointer->extsymcollector.insert({ exsympointer->SYMESDID, *exsympointer });

	}

GeneralRe: how to typedef array of 4 char to be used in map template still getting compile errors Pin
CPallini15-Dec-22 3:01
mveCPallini15-Dec-22 3:01 
GeneralRe: how to typedef array of 4 char to be used in map template still getting compile errors Pin
ForNow15-Dec-22 3:12
ForNow15-Dec-22 3:12 
GeneralRe: how to typedef array of 4 char to be used in map template still getting compile errors Pin
CPallini15-Dec-22 3:22
mveCPallini15-Dec-22 3:22 
GeneralRe: how to typedef array of 4 char to be used in map template still getting compile errors Pin
ForNow15-Dec-22 3:33
ForNow15-Dec-22 3:33 
QuestionRe: how to typedef array of 4 char to be used in map template still getting compile errors Pin
CPallini15-Dec-22 3:40
mveCPallini15-Dec-22 3:40 
AnswerRe: how to typedef array of 4 char to be used in map template still getting compile errors Pin
ForNow15-Dec-22 3:51
ForNow15-Dec-22 3:51 
GeneralRe: how to typedef array of 4 char to be used in map template my solution CPallini hope you read this thank you Pin
ForNow15-Dec-22 12:47
ForNow15-Dec-22 12:47 
GeneralRe: how to typedef array of 4 char to be used in map template my solution CPallini hope you read this thank you Pin
CPallini15-Dec-22 20:46
mveCPallini15-Dec-22 20:46 
GeneralRe: how to typedef array of 4 char to be used in map template my solution CPallini hope you read this thank you Pin
ForNow16-Dec-22 2:40
ForNow16-Dec-22 2:40 
GeneralRe: how to typedef array of 4 char to be used in map template my solution CPallini hope you read this thank you Pin
CPallini16-Dec-22 3:00
mveCPallini16-Dec-22 3:00 
GeneralRe: how to typedef array of 4 char to be used in map template my solution CPallini hope you read this thank you Pin
Richard MacCutchan15-Dec-22 21:27
mveRichard MacCutchan15-Dec-22 21:27 
GeneralRe: how to typedef array of 4 char to be used in map template my solution CPallini hope you read this thank you Pin
ForNow16-Dec-22 2:41
ForNow16-Dec-22 2:41 
GeneralRe: how to typedef array of 4 char to be used in map template my solution CPallini hope you read this thank you Pin
CPallini16-Dec-22 2:53
mveCPallini16-Dec-22 2:53 
GeneralRe: how to typedef array of 4 char to be used in map template my solution CPallini hope you read this thank you Pin
ForNow16-Dec-22 3:06
ForNow16-Dec-22 3:06 
GeneralRe: how to typedef array of 4 char to be used in map template my solution CPallini hope you read this thank you Pin
CPallini16-Dec-22 3:19
mveCPallini16-Dec-22 3:19 
GeneralRe: how to typedef array of 4 char to be used in map template my solution CPallini hope you read this thank you Pin
ForNow16-Dec-22 3:37
ForNow16-Dec-22 3:37 
GeneralRe: how to typedef array of 4 char to be used in map template my solution CPallini hope you read this thank you Pin
CPallini16-Dec-22 4:38
mveCPallini16-Dec-22 4:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.