Home » Community » Newbie corner » Dialog boxes : why struc instead of class ?
|
Re: Dialog boxes : why struc instead of class ? [message #31630 is a reply to message #31624] |
Fri, 18 March 2011 13:29   |
|
Hi Jibe,
In C++, the only difference between struct and class are in default access right to the members. Class has private members as defualt, struct uses public, otherwise the behavior is the same. So using struct for dialogs in U++ is just laziness to write class XYZ{ public: ... } You can of course use whatever form you like better, there is no functional difference.
The CLASSNAME could be equally well STRUCTNAME (or ASFDGFSDGSDFG or whatever else ). I guess it kind of makes sense to call it CLASSNAME though, because class is well defined, while struct can be C struct or C++ struct and that could sound a bit ambiguous (not sure how much difference there is if any...).
Best regards,
Honza
|
|
|
|
|
|
Goto Forum:
Current Time: Wed Apr 30 01:52:21 CEST 2025
Total time taken to generate the page: 0.00701 seconds
|