Click here to Skip to main content
14,425,324 members

C / C++ / MFC

 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Vaclav_6-Dec-19 9:17
MemberVaclav_6-Dec-19 9:17 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Victor Nijegorodov6-Dec-19 22:39
MemberVictor Nijegorodov6-Dec-19 22:39 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Richard MacCutchan6-Dec-19 23:02
communityengineerRichard MacCutchan6-Dec-19 23:02 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Stefan_Lang8-Dec-19 23:13
mveStefan_Lang8-Dec-19 23:13 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Richard MacCutchan8-Dec-19 23:21
communityengineerRichard MacCutchan8-Dec-19 23:21 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Richard MacCutchan6-Dec-19 23:01
communityengineerRichard MacCutchan6-Dec-19 23:01 
AnswerRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
CPallini8-Dec-19 23:09
mveCPallini8-Dec-19 23:09 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Stefan_Lang9-Dec-19 0:01
mveStefan_Lang9-Dec-19 0:01 
It's not proper C code to start with, and I'm not even complaining about goto. Given the weird malloc statements it's pretty obvious there's some severe memory clusterfuck taking place. The structs and pointers being defined do not represent what is being stored. dl is being allocated twice, and dr not at all.

Given the the quality of the visible code, I strongly doubt that the code that uses these pointers is accessing the underlying memory correctly.

There's not a chance in hell to turn that into clean C++ if the original C code isn't cleaned up first.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
CPallini9-Dec-19 0:35
mveCPallini9-Dec-19 0:35 
AnswerRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Stefan_Lang8-Dec-19 23:47
mveStefan_Lang8-Dec-19 23:47 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Vaclav_9-Dec-19 4:33
MemberVaclav_9-Dec-19 4:33 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Stefan_Lang9-Dec-19 5:11
mveStefan_Lang9-Dec-19 5:11 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Vaclav_9-Dec-19 8:57
MemberVaclav_9-Dec-19 8:57 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Stefan_Lang9-Dec-19 21:32
mveStefan_Lang9-Dec-19 21:32 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Stefan_Lang9-Dec-19 6:41
mveStefan_Lang9-Dec-19 6:41 
QuestionRichard MacCutchan had 1.5 mg storage in CrichEditCtrl the answer Limittext Pin
ForNow1-Dec-19 14:55
MemberForNow1-Dec-19 14:55 
AnswerRe: Richard MacCutchan had 1.5 mg storage in CrichEditCtrl the answer Limittext Pin
Stefan_Lang1-Dec-19 21:59
mveStefan_Lang1-Dec-19 21:59 
GeneralRe: Richard MacCutchan had 1.5 mg storage in CrichEditCtrl the answer Limittext Pin
Richard MacCutchan1-Dec-19 23:09
communityengineerRichard MacCutchan1-Dec-19 23:09 
QuestionModifying STREAMed input in a RichEditControl Pin
ForNow30-Nov-19 21:34
MemberForNow30-Nov-19 21:34 
AnswerRe: Modifying STREAMed input in a RichEditControl Pin
Richard MacCutchan30-Nov-19 23:52
communityengineerRichard MacCutchan30-Nov-19 23:52 
GeneralRe: Modifying STREAMed input in a RichEditControl Pin
ForNow1-Dec-19 3:07
MemberForNow1-Dec-19 3:07 
GeneralRe: Modifying STREAMed input in a RichEditControl Pin
Richard MacCutchan1-Dec-19 8:14
communityengineerRichard MacCutchan1-Dec-19 8:14 
GeneralRe: Modifying STREAMed input in a RichEditControl Pin
ForNow1-Dec-19 8:58
MemberForNow1-Dec-19 8:58 
GeneralRe: Modifying STREAMed input in a RichEditControl Pin
Richard MacCutchan1-Dec-19 9:04
communityengineerRichard MacCutchan1-Dec-19 9:04 
GeneralRe: Modifying STREAMed input in a RichEditControl Pin
ForNow1-Dec-19 9:10
MemberForNow1-Dec-19 9:10 

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.