C++ question [Archive] - SpeedGuide.net Broadband Community

View Full Version : C++ question


Gundamflare
03-20-02, 01:05 PM
Is it possible to port a C++ program into a interactive GUI? I'm thinking of making a rather cool final project for my AP class, and was wondering if it was possible. I would release the project's specifics, but it is strictly classified as of now.

Stu
03-20-02, 04:22 PM
Yes, provided you designed the program in an adaptable way to begin with. Otherwise, you may have to do a fair amount of re-writes.

As to how you would do it, you'd end up having to use a toolkit of some sort--programming GUIs aren't a part of C++ the language itself as they are in Java. Both Visual C++ and Borland C++ Builder integrate toolkits into their IDE, but there are plenty of others available (QT, GTK+, FLTK, FOX, Lesstif, OpenMotif, XView, etc.--some of which port to windows and mac, some are only for the unices).

Gundamflare
03-20-02, 05:38 PM
hmm, is it possible to port most of the code into Java format?

Stu
03-21-02, 12:42 AM
Yes, you would have to make sure all your pointers were changed to references, your class definitions would have to be modified a bit, you'd have to change to using the Java libraries that are comparable to the C++ ones, and possibly change some variable definitions (at least syntactically). For the GUI portion you would use Swing and/or AWT under Java.

Either way you do it, it'll probably take the same amount of effort in the end.

corkymccorkle
04-02-02, 11:52 PM
you know i would think GUI would somehow correspond to VISUAL C++, what do you think?