Click here to Skip to main content
15,881,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Vaclav_6-Dec-19 8:17
Vaclav_6-Dec-19 8:17 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Victor Nijegorodov6-Dec-19 21:39
Victor 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
Stefan_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
Stefan_Lang8-Dec-19 23: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
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
Stefan_Lang8-Dec-19 22:47 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Vaclav_9-Dec-19 3:33
Vaclav_9-Dec-19 3:33 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Stefan_Lang9-Dec-19 4:11
Stefan_Lang9-Dec-19 4:11 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Vaclav_9-Dec-19 7:57
Vaclav_9-Dec-19 7:57 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Stefan_Lang9-Dec-19 20:32
Stefan_Lang9-Dec-19 20:32 
GeneralRe: Allocating memory for struct pointer - error: invalid conversion from ‘void*’ Pin
Stefan_Lang9-Dec-19 5:41
Stefan_Lang9-Dec-19 5:41 
QuestionRichard MacCutchan had 1.5 mg storage in CrichEditCtrl the answer Limittext Pin
ForNow1-Dec-19 13:55
ForNow1-Dec-19 13:55 
AnswerRe: Richard MacCutchan had 1.5 mg storage in CrichEditCtrl the answer Limittext Pin
Stefan_Lang1-Dec-19 20:59
Stefan_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
ForNow30-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
ForNow1-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
ForNow1-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
ForNow1-Dec-19 8: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.