Re: doing C++ the Java way
On 8 mar, 02:20, Carmen Sei <fatwallet...@yahoo.com> wrote:
I need to write a C++ application prototype that uses a graphics
engine in 2 weeks.
http://openframeworks.cc/about
I know Java pretty well, but I don't know C++.
In which case, you can't write a reasonable application
prototype in C++ in two weeks. It's that simple.
Can i write the C++ prototype using only Java equivalent
features?
There are fundamental differences in the language---it's not
just a matter of feature sets, but differences in the way the
languages work.
I only use Class objects, static variable, single inheritance
(extends), new+free()/delete(), #define
C++ features that I don't use - no struct, no enum, no extern,
no non-OO, no multiple inheritance, no template ... etc
No extern? You mean you write everything in a single source
file?
I think if I do that way, I will be able to finish my C++
prototype quickly, all I need to do is translate the Java
program (.java) file into .cpp and .h file.
You can find a common subset of features, and only use them.
You may even be able to get something through the compiler doing
this. It won't have the same semantics, however.
Is it a good idea for a person need to finish a C++ app (about
8 - 10 cpp files) in 2 weeks and don' t know C++?
If you don't know C++, I don't think you'll be able to get
anything reasonably working in 2 weeks. If you're talking about
8-10 source files, it depends on what you put in the source
file. I know that there are a lot of applications which would
only be 8-10 classes that I couldn't do in two weeks, and I
already know the language.
the app need to call some Class / Library from the graphics
framework above and do some internet XML parsing and render
data into cool graphics ... etc.
If it's only a prototype... You're best bet (although it's still
a long shot) would be to learn enough C++ to write a Java
mapping in JNS, and write the actual prototype in Java. C++ is
not a simple tool which can be learned in a few days.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34