Mail Archives: djgpp/1999/04/08/08:21:04
From: | "Christopher Nelson" <paradox AT gye DOT satnet DOT net>
|
To: | <djgpp AT delorie DOT com>
|
Subject: | Re: Generate c code from c++?
|
Date: | Wed, 7 Apr 1999 14:57:28 -0600
|
Message-ID: | <01be8139$3f7b0b60$LocalHost@thendren>
|
MIME-Version: | 1.0
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Mailer: | Microsoft Outlook Express 4.71.1712.3
|
X-MimeOLE: | Produced By Microsoft MimeOLE V4.71.1712.3
|
Reply-To: | djgpp AT delorie DOT com
|
>Hi, does anyone know how to use djgpp or other tools to
>generate c code from c++ code?
1st, why would you want to? (C++ is nearly as fast, more flexible, and
usually better for the projects that it's written for than equivalent C
code.)
Secondly, I've never heard of one. The point of C++ is it's OOP algorithm
and paradigm. To translate it to C is usually a large, difficult, and
MANUAL procedure. There's really no way to accurately translate all C++
programs to C.
There is one caveat to this situation: if the C++ program doesn't take
advantage of classes, it's usually trivial to translate it. Of course, then
it's not really C++, just C being compiled by the C++ compiler.
-={C}=-
- Raw text -