|
![](/i/fill.gif) |
Am 07.06.2012 12:06, schrieb Invisible:
> Whether I will fix these issues or move on to another project remains to
> be seen. Originally my goal was to write the program in Java (which is
> object-oriented), and then have a go at translating it to C++. (Without
> the GUI, because I have no idea how to do GUI programming in C++, and it
> sounds highly non-trivial.) But actually, it looks like it's going to be
> impossible, because it fundamentally /requires/ abstract classes, which
> are hard in C++. So probably another Java project then...
Abstract classes hard in C++? That's news to me. Last time I checked
they were quite trivial:
class C
{
public:
virtual ~C() {}
virtual void DoSomething() = 0;
};
There. An abstract class.
class D: public C
{
public:
virtual ~D() {}
virtual void DoSomething() { ... }
};
There. A class implementing the abstract one.
C* Foo;
Foo = new D();
Foo.DoSomething();
delete Foo;
There. An implementation of an abstract class in action.
Did I miss anything?
If you're using MS Visual Studio (or any other sane contemporary C++
IDE), GUI programming is quite easy as well; after all, you have a GUI
builder included. (Writing a /portable/ GUI in C++ is an entirely
different matter of course, and the beginners' how-to boils down to one
and a half words: "Don't.")
Post a reply to this message
|
![](/i/fill.gif) |