Click here to Skip to main content
15,922,166 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Conversion from- C++ to C-language < free(): invalid size > Pin
k505425-Apr-19 10:05
mvek505425-Apr-19 10:05 
AnswerRe: Conversion from- C++ to C-language < free(): invalid size > Pin
John R. Shaw26-Apr-19 9:19
John R. Shaw26-Apr-19 9:19 
GeneralRe: Conversion from- C++ to C-language < free(): invalid size > Pin
zak10026-Apr-19 10:22
zak10026-Apr-19 10:22 
GeneralRe: Conversion from- C++ to C-language < free(): invalid size > Pin
John R. Shaw26-Apr-19 12:31
John R. Shaw26-Apr-19 12:31 
GeneralRe: Conversion from- C++ to C-language < free(): invalid size > Pin
zak10026-Apr-19 14:57
zak10026-Apr-19 14:57 
GeneralRe: Conversion from- C++ to C-language < free(): invalid size > Pin
zak10026-Apr-19 17:53
zak10026-Apr-19 17:53 
GeneralRe: Conversion from- C++ to C-language < free(): invalid size > Pin
John R. Shaw30-Apr-19 4:56
John R. Shaw30-Apr-19 4:56 
GeneralRe: Conversion from- C++ to C-language < free(): invalid size > Pin
zak10030-Apr-19 5:48
zak10030-Apr-19 5:48 
QuestionPointer to Pointer: Conversion from- C++ to C-language Pin
zak10024-Apr-19 18:47
zak10024-Apr-19 18:47 
AnswerRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
Victor Nijegorodov24-Apr-19 20:41
Victor Nijegorodov24-Apr-19 20:41 
GeneralRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
leon de boer25-Apr-19 2:09
leon de boer25-Apr-19 2:09 
GeneralRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
k505425-Apr-19 7:16
mvek505425-Apr-19 7:16 
GeneralRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
Richard MacCutchan24-Apr-19 21:36
mveRichard MacCutchan24-Apr-19 21:36 
GeneralRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
leon de boer25-Apr-19 2:04
leon de boer25-Apr-19 2:04 
GeneralRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
Richard MacCutchan25-Apr-19 2:46
mveRichard MacCutchan25-Apr-19 2:46 
GeneralRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
zak10025-Apr-19 6:52
zak10025-Apr-19 6:52 
GeneralRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
Joe Woodbury29-Apr-19 6:38
professionalJoe Woodbury29-Apr-19 6:38 
GeneralRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
leon de boer3-May-19 4:20
leon de boer3-May-19 4:20 
GeneralRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
Joe Woodbury3-May-19 5:51
professionalJoe Woodbury3-May-19 5:51 
GeneralRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
zak10025-Apr-19 7:05
zak10025-Apr-19 7:05 
GeneralRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
zak10025-Apr-19 7:10
zak10025-Apr-19 7:10 
GeneralRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
leon de boer25-Apr-19 7:49
leon de boer25-Apr-19 7:49 
GeneralRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
zak10025-Apr-19 8:56
zak10025-Apr-19 8:56 
AnswerRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
ChrisFromWales30-Apr-19 23:37
ChrisFromWales30-Apr-19 23:37 
I guess this won't be the reply you expect or want, but …

In the early 1980s, when the C++ language was first being developed at Bell Labs, the first (and for a long time the only) "compiler" for C++ was a tool called cfront. It converted C++ source code into valid C source code (for which there were already a gazillion compilers, of course) The cfront compiler was actually maintained for over a decade, ending with the release of version 3.0.3 (the last official version of which I am aware) in May 1994.

Your current project (as I understand it), is to convert some existing C++ source code (that allegedly works correctly) into C source code (presumably also with the works correctly option). I suspect the ultimate target is a platform for which no C++ compiler is available.

If the original C++ source that you are porting does NOT make extensive use of some of the more modern additions to the language, then you might consider running cfront on the original C++ source. I am not suggesting that it should replace your manual porting efforts to date, but to act merely as your assistant in a purely advisory capacity.

The last version of cfront was released around the time that the C++ language added templates (which are implemented) and exceptions (which are not implemented). If you are interested, you can download cfront or browse the source code courtesy of the Software Preservation Group (which is part of the Computer History Museum in Mountain View, California (Silicon Valley).

You can either download cfront version 3.0.3 from May 1994 (as a gzip'd tar archive), or as an alternative if you prefer, you can browse the source tree (in a new browser window).
GeneralRe: Pointer to Pointer: Conversion from- C++ to C-language Pin
Stefan_Lang4-Jun-19 22:01
Stefan_Lang4-Jun-19 22:01 

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.