Click here to Skip to main content
15,921,660 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to typedef array of 4 char to be used in map template Pin
ForNow13-Dec-22 14:17
ForNow13-Dec-22 14:17 
Hi Mainframe data big endian which I am trying to typedef 4 bytes I would rather not do it as int

I tried the following typedef char ESDID[4] where ESDID would represent 4 bytes

I also have this type ESDID in structure and would like to use it as a key

for example
C++
struct syminfo
{
	unsigned char recordtype;
	unsigned char recordtypeflag;
	ESDID symesdid;
	BYTE seclen[4];
	ESDID eseclen;
	char* symname;

};


I am getting all sort of comple errors when I map it

C++
syminfo* exsympointer = (syminfo*)procpointer->buffer;

		procpointer->extsymcollector.insert(std::pair<ESDID, syminfo>(exsympointer->symesdid, *exsympointer));


The map is define as such
C++
map<ESDID, syminfo> extsymcollector;


I think thesee aerror are from the way I tried to typdef ESDID if also tried to set as an struct type
struct ESDID
{
char x[4];
};

either way I get errors
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 
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 
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 5:11
ForNow16-Dec-22 5:11 
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 MacCutchan16-Dec-22 6:26
mveRichard MacCutchan16-Dec-22 6:26 

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.