Good Evening Everyone,
Before I get started I think I should tell you all that I am a VB programmer, trying to learn C++. To make it worse, my C++ project, is on Intel Dialogic products. And that means most of the examples, are written in standard C. Anyways, I got this code script down from 137 errors down to one error. The error is:
error C2440: '=' : cannot convert from 'void *' to 'BOARD_INFO *' Conversion from 'void*' to pointer to non-'void' requires an explicit cast
The definition of BOARD_INFO is:
I have the following line declaring a global array of BOARD_INFO:Code:typedef struct { char name[BUFF_LEN]; int* pChDev; FEATURE_TABLE* pFT; ct_devinfo* pDevInfo; char nameB[BUFF_LEN]; char nameC[BUFF_LEN]; char buff[BUFF_LEN]; int dev; int nr; int err; int line; DX_IOTT* plott; char nmC[1024]; int bd, ch; int bdV, chV; char* pChannel[BUFF_LEN]; long devBRD; LINEDEV* pLineDev; int nrChannels; } BOARD_INFO;
Code:BOARD_INFO* gBoardInfo;
The line I am getting the error on is:
gBoardCount is an integer.Code:gBoardInfo = calloc (gBoardCount,sizeof(BOARD_INFO));
I do not understand the error. I mean I do, but I don't know how it is becoming an error. Let me say what I think the error is saying, and maybe someone can correct my problem, and maybe even explain the error so that it makes sense to me if I should encounter it again.
error C2440: '=' : cannot convert from 'void *' to 'BOARD_INFO *' Conversion from 'void*' to pointer to non-'void' requires an explicit cast
I know that gBoardInfo is an array that hasn't been defined in size. The function will allocate X arrays of BOARD_INFO. But I just don't understand how it see's a "Void" being returned. I dunno, maybe none of what I said makes sense. . . Just wish it.![]()



LinkBack URL
About LinkBacks



