|
![](/i/fill.gif) |
Am 07.06.2012 13:34, 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
>
>> Did I miss anything?
>
> ...or rather, to /use/ run-time polymorphism, you need to do manual
> memory management, and manual memory management is infamously hard.
... or use Boost's (or C++11's) smart pointers.
>> 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.
>
> Yeah, but I'm told programming the Win32 APIs directly is incredibly
> hard. Even if you've got an IDE to generate some of the code for you, I
> rather suspect that without a deep understanding for how it works,
> you'll never be able to fill in the empty bits where your application
> goes...
Sane IDEs don't use the Win32 C API for GUI (or for most anything else
for that matter); instead, they come with a fancy object-oriented
framework of libraries hiding all the uglies from you. (MFC used to be
the thing for MS Visual C++; they have something new by now, same thing
they use for C#.)
>> (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.")
>
> This is true of /most/ programming languages that compile to native
> code, to be fair. ;-)
True enough.
First time I ever wrote a C program that needed graphical output, I
actually opted for using a printer rather than the computer display,
because I already knew some PostScript :-P (Later I employed GhostScript
of course; but only for test runs, as the "display" quality of the A3
printer was unparalleled :-))
Post a reply to this message
|
![](/i/fill.gif) |