Isn’t it better to write the body of virtual ~MyMainFrame() just as
instead of
example2b.cxx:
Isn’t it better to include the following lines?
void example() { ... }
int main() { ... }
I know that experienced programmers won’t confuse, but I will…
By the way, I think it’s better to use SIMPLE double quotation marks on #include lines: in example2[ab].cxx, OPENING/CLOSING double quotation marks are used.
In principle you are right, but the code you refer to is just a guideline to show the difference between using RQ_OBJECT and inheriting from a TQObject class. It is not a fully working example.
This kind of coding: { ... } means: user has to do (write) some code there, and has nothing to do with:
{;} which is a no-op piece of code…
And sorry, but I don’t understand what you mean by: [quote]By the way, I think it’s better to use SIMPLE double quotation marks on #include lines: in example2[ab].cxx, OPENING/CLOSING double quotation marks are used.[/quote]
Cheers,
Bertrand.
Well, yes. But, the only thing done in the destructor (in the script version) are cleanup and delete of fMain, and this version uses an object which was derived from TGMainFrame, therefore I thought there’s nothing to do in the destructor…
[quote=“bellenot”]
And sorry, but I don’t understand what you mean by: [quote]By the way, I think it’s better to use SIMPLE double quotation marks on #include lines: in example2[ab].cxx, OPENING/CLOSING double quotation marks are used.[/quote]
Cheers,
Bertrand.[/quote]
I think it’s better to use plain "s, instead of (well, it seems that phpBB doesn’t support the use of multibyte characters and it’s difficult to show them here) using left/right inclined double quotation marks.
Please see the marks in the “example2b.h” line of the example.