Click here to Skip to main content
14,980,370 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: V2008: All my breakpoints disable. Mouseover shows "The breakpoint will not currently be hit. No executable code is associated with this line." Pin
leon de boer8-Dec-19 13:10
Memberleon de boer8-Dec-19 13:10 
GeneralRe: V2008: All my breakpoints disable. Mouseover shows "The breakpoint will not currently be hit. No executable code is associated with this line." Pin
Stefan_Lang8-Dec-19 23:20
mveStefan_Lang8-Dec-19 23:20 
GeneralRe: V2008: All my breakpoints disable. Mouseover shows "The breakpoint will not currently be hit. No executable code is associated with this line." Pin
leon de boer9-Dec-19 0:52
Memberleon de boer9-Dec-19 0:52 
GeneralRe: V2008: All my breakpoints disable. Mouseover shows "The breakpoint will not currently be hit. No executable code is associated with this line." Pin
Stefan_Lang9-Dec-19 1:59
mveStefan_Lang9-Dec-19 1:59 
GeneralRe: V2008: All my breakpoints disable. Mouseover shows "The breakpoint will not currently be hit. No executable code is associated with this line." Pin
charlieg9-Dec-19 2:05
Membercharlieg9-Dec-19 2:05 
AnswerRe: V2008: All my breakpoints disable. Mouseover shows "The breakpoint will not currently be hit. No executable code is associated with this line." Pin
charlieg9-Dec-19 2:09
Membercharlieg9-Dec-19 2:09 
AnswerRe: V2008: All my breakpoints disable. Mouseover shows "The breakpoint will not currently be hit. No executable code is associated with this line." Pin
charlieg8-Jan-20 11:37
Membercharlieg8-Jan-20 11:37 
QuestionAllocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Vaclav_6-Dec-19 5:56
MemberVaclav_6-Dec-19 5:56 
I could use some very basic assistance solving this problem.
The struct is located inside class function and I am not sure if that is OK.
I am trying to port C code to C++.

Here is the error
I get same error for both test calls to malloc

../src/MODULES/M_BLUEZ/CBLUEZ.cpp:505:14: error: invalid conversion from ‘void*’ to ‘hci_dev_list_req*’ [-fpermissive]
   dl = malloc(HCI_MAX_DEV * sizeof(*dr) + sizeof(*dl));



Here is the offending code snippet

<pre>	struct hci_dev_list_req *dl;
	struct hci_dev_req *dr;
	int dev_id = -1;
	int i, sk, err = 0;


	dl = malloc(HCI_MAX_DEV * sizeof(*dr) + sizeof(*dl));
	if (!dl) {
		err = errno;
		goto done;
	}

	dl = malloc(HCI_MAX_DEV * sizeof(struct hci_dev_req) + sizeof(uint16_t)); 




Thanks
Cheers
AnswerRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Richard MacCutchan6-Dec-19 6:12
mveRichard MacCutchan6-Dec-19 6:12 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Vaclav_6-Dec-19 8:17
MemberVaclav_6-Dec-19 8:17 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Victor Nijegorodov6-Dec-19 21:39
MemberVictor Nijegorodov6-Dec-19 21:39 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Richard MacCutchan6-Dec-19 22:02
mveRichard MacCutchan6-Dec-19 22:02 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Stefan_Lang8-Dec-19 22:13
mveStefan_Lang8-Dec-19 22:13 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Richard MacCutchan8-Dec-19 22:21
mveRichard MacCutchan8-Dec-19 22:21 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Richard MacCutchan6-Dec-19 22:01
mveRichard MacCutchan6-Dec-19 22:01 
AnswerRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
CPallini8-Dec-19 22:09
mveCPallini8-Dec-19 22:09 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Stefan_Lang8-Dec-19 23:01
mveStefan_Lang8-Dec-19 23:01 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
CPallini8-Dec-19 23:35
mveCPallini8-Dec-19 23:35 
AnswerRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Stefan_Lang8-Dec-19 22:47
mveStefan_Lang8-Dec-19 22:47 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Vaclav_9-Dec-19 3:33
MemberVaclav_9-Dec-19 3:33 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Stefan_Lang9-Dec-19 4:11
mveStefan_Lang9-Dec-19 4:11 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Vaclav_9-Dec-19 7:57
MemberVaclav_9-Dec-19 7:57 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Stefan_Lang9-Dec-19 20:32
mveStefan_Lang9-Dec-19 20:32 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Stefan_Lang9-Dec-19 5:41
mveStefan_Lang9-Dec-19 5:41 
QuestionRichard MacCutchan had 1.5 mg storage in CrichEditCtrl the answer Limittext Pin
ForNow1-Dec-19 13:55
MemberForNow1-Dec-19 13:55 

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.