Click here to Skip to main content
14,923,486 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
Bad news.
I tried this
array<hci_dev_list_req, HCI_MAX_DEV> dl_array;

and it broke GPIO class after enabling C11 in crosscompiler - as requested by complier error.

I guess I need to go back, at least temporary, and just hack it with
reinterpret_cast.
.

Just FYI - the struct are used to access ioctl and that is an area I do no want to mess with since it works for other I/O access.


struct hci_dev_req {
    uint16_t dev_id;
    uint32_t dev_opt;
};

struct hci_dev_list_req {
    uint16_t dev_num;
    struct hci_dev_req dev_req[0];  /* hci_dev_req structures */
};


I have not given it much thought, but could I put the "malloc" replacement as "class variable" ( instead allocating / freeing the memory in function itself as it was done in C ) or into a class constructor ?
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 
AnswerRe: Richard MacCutchan had 1.5 mg storage in CrichEditCtrl the answer Limittext Pin
Stefan_Lang1-Dec-19 20:59
mveStefan_Lang1-Dec-19 20:59 
GeneralRe: Richard MacCutchan had 1.5 mg storage in CrichEditCtrl the answer Limittext Pin
Richard MacCutchan1-Dec-19 22:09
mveRichard MacCutchan1-Dec-19 22:09 
QuestionModifying STREAMed input in a RichEditControl Pin
ForNow30-Nov-19 20:34
MemberForNow30-Nov-19 20:34 
AnswerRe: Modifying STREAMed input in a RichEditControl Pin
Richard MacCutchan30-Nov-19 22:52
mveRichard MacCutchan30-Nov-19 22:52 
GeneralRe: Modifying STREAMed input in a RichEditControl Pin
ForNow1-Dec-19 2:07
MemberForNow1-Dec-19 2:07 
GeneralRe: Modifying STREAMed input in a RichEditControl Pin
Richard MacCutchan1-Dec-19 7:14
mveRichard MacCutchan1-Dec-19 7:14 
GeneralRe: Modifying STREAMed input in a RichEditControl Pin
ForNow1-Dec-19 7:58
MemberForNow1-Dec-19 7:58 
GeneralRe: Modifying STREAMed input in a RichEditControl Pin
Richard MacCutchan1-Dec-19 8:04
mveRichard MacCutchan1-Dec-19 8:04 
GeneralRe: Modifying STREAMed input in a RichEditControl Pin
ForNow1-Dec-19 8:10
MemberForNow1-Dec-19 8:10 
QuestionHow read XLSX file without office automation? Pin
Le@rner19-Nov-19 0:22
MemberLe@rner19-Nov-19 0:22 
AnswerRe: How read XLSX file without office automation? Pin
Victor Nijegorodov19-Nov-19 0:53
MemberVictor Nijegorodov19-Nov-19 0:53 
AnswerRe: How read XLSX file without office automation? Pin
Richard Deeming19-Nov-19 1:14
mveRichard Deeming19-Nov-19 1:14 
GeneralRe: How read XLSX file without office automation? Pin
Le@rner19-Nov-19 1:36
MemberLe@rner19-Nov-19 1:36 
GeneralRe: How read XLSX file without office automation? Pin
Richard Deeming19-Nov-19 2:19
mveRichard Deeming19-Nov-19 2:19 

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.